mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
cleanup: dmeventd set next_time when registering
Don't change next_time, when thread is already registered.
This commit is contained in:
parent
dc21bbfabd
commit
3febd2c9d4
@ -572,9 +572,8 @@ static int _register_for_timeout(struct thread_status *thread)
|
|||||||
|
|
||||||
pthread_mutex_lock(&_timeout_mutex);
|
pthread_mutex_lock(&_timeout_mutex);
|
||||||
|
|
||||||
thread->next_time = time(NULL) + thread->timeout;
|
|
||||||
|
|
||||||
if (dm_list_empty(&thread->timeout_list)) {
|
if (dm_list_empty(&thread->timeout_list)) {
|
||||||
|
thread->next_time = time(NULL) + thread->timeout;
|
||||||
dm_list_add(&_timeout_registry, &thread->timeout_list);
|
dm_list_add(&_timeout_registry, &thread->timeout_list);
|
||||||
if (_timeout_running)
|
if (_timeout_running)
|
||||||
pthread_cond_signal(&_timeout_cond);
|
pthread_cond_signal(&_timeout_cond);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user