Fix connection_is_idle test for idleness
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 12 Mar 2010 15:24:01 +0000 (16:24 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 12 Mar 2010 15:24:01 +0000 (16:24 +0100)
Function connection_is_idle no longer returns 1 (idle) if
ZOOM_connection_peek_event returns ZOOM_EVENT_END. The problem is that
when this is returned another thread may still be chewing on a record.

src/connection.c

index 1525dfb..cfa1146 100644 (file)
@@ -79,7 +79,7 @@ static int connection_is_idle(struct connection *co)
     if (!ZOOM_connection_is_idle(link))
         return 0;
     event = ZOOM_connection_peek_event(link);
-    if (event == ZOOM_EVENT_NONE || event == ZOOM_EVENT_END)
+    if (event == ZOOM_EVENT_NONE)
         return 1;
     else
         return 0;