EVENT-Client: fix the abort routines when we wake up and just get zero bytes.
[citadel.git] / 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) {