1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: dmeventd set next_time when registering

Don't change next_time, when thread is already registered.
This commit is contained in:
Zdenek Kabelac 2014-04-18 14:30:00 +02:00
parent dc21bbfabd
commit 3febd2c9d4

View File

@ -572,9 +572,8 @@ static int _register_for_timeout(struct thread_status *thread)
pthread_mutex_lock(&_timeout_mutex);
thread->next_time = time(NULL) + thread->timeout;
if (dm_list_empty(&thread->timeout_list)) {
thread->next_time = time(NULL) + thread->timeout;
dm_list_add(&_timeout_registry, &thread->timeout_list);
if (_timeout_running)
pthread_cond_signal(&_timeout_cond);