Switch from sketchy dup() juggling to callbacks to retry outgoing connection.

This commit is contained in:
Ian Gulliver
2016-02-24 20:15:09 -08:00
parent 63f5313b96
commit 1635534243
14 changed files with 83 additions and 68 deletions

View File

@@ -54,11 +54,10 @@ int wakeup_get_delay() {
void wakeup_dispatch() {
uint64_t now = wakeup_get_time_ms();
while (head && head->absolute_time_ms <= now) {
struct peer *peer = head->peer;
peer_call(head->peer);
struct wakeup_entry *next = head->next;
free(head);
head = next;
peer->event_handler(peer);
}
}