]> code.citadel.org Git - citadel.git/blobdiff - citadel/event_client.c
EVENT-Client: fix the abort routines when we wake up and just get zero bytes.
[citadel.git] / citadel / event_client.c
index 383668c45722027327f21b26ccebddf44e8cbb55..35581e516b37022ef18b602117fb0c63d60e3acd 100644 (file)
@@ -1,20 +1,13 @@
 /*
- *
  * Copyright (c) 1998-2012 by the citadel.org team
  *
- *  This program is open source software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 3.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  */
 
 #include "sysdep.h"
@@ -812,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) {