1
0
forked from bip/bip

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:
nohar 2005-05-27 15:00:11 +00:00
parent d9a149b4dd
commit 14cf13cfb6

View File

@ -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;