fix: wait_event now waits when there is no socket active (that happens when we to nothing but wait for a reconnect timeout to trigger)
This commit is contained in:
parent
d9a149b4dd
commit
14cf13cfb6
@ -768,8 +768,11 @@ list_t *wait_event(list_t *cn_list, int *msec, int *nc)
|
||||
}
|
||||
|
||||
/* if no connection is active, return the list... empty... */
|
||||
if (maxfd == -1)
|
||||
if (maxfd == -1) {
|
||||
usleep(*msec * 1000);
|
||||
*msec = 0;
|
||||
return cn_newdata;
|
||||
}
|
||||
|
||||
tv.tv_sec = *msec / 1000;
|
||||
tv.tv_usec = (*msec % 1000) * 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user