libev migration - shutdown cleanly.
authorWilfried Goesgens <dothebart@citadel.org>
Fri, 7 Jan 2011 11:04:21 +0000 (12:04 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Fri, 7 Jan 2011 11:04:21 +0000 (12:04 +0100)
citadel/modules/eventclient/serv_eventclient.c

index ecd5cf67d3562675e7bdb5f9476eeaff44ece443..d135dccf6c4547f668aef00778ab0e1fa25a9077 100644 (file)
@@ -107,7 +107,8 @@ static void QueueEventAddCallback(struct ev_loop *loop, ev_io *watcher, int reve
                /////event_del(&queue_add_event);
                close(event_add_pipe[0]);
 /// TODO; flush QueueEvents fd's and delete it.
-               ev_io_stop(event_base, NULL);
+               ev_io_stop(event_base, &queue_add_event);
+               ev_unloop(event_base, EVUNLOOP_ALL);
        }
        /* Unblock the other side */
 //     read(fd, buf, 1);