EVENT-Client: fix the abort routines when we wake up and just get zero bytes.
authorWilfried Goesgens <dothebart@citadel.org>
Tue, 3 Jul 2012 20:22:56 +0000 (22:22 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 3 Jul 2012 20:22:56 +0000 (22:22 +0200)
citadel/event_client.c

index 79a2f0f9c213feb6d4b8517f0de0d7cbef88aae3..35581e516b37022ef18b602117fb0c63d60e3acd 100644 (file)
@@ -805,7 +805,8 @@ IO_recv_callback(struct ev_loop *loop, ev_io *watcher, int revents)
        if (nbytes > 0) {
                HandleInbound(IO);
        } else if (nbytes == 0) {
-               SetNextTimeout(IO, 0.0);
+               StopClientWatchers(IO, 1);
+               SetNextTimeout(IO, 0.01);
                return;
        } else if (nbytes == -1) {
                if (errno != EAGAIN) {