Fix assert in ZOOM when http connect fails YAZ-757
authorAdam Dickmeiss <adam@indexdata.dk>
Sat, 12 Apr 2014 06:06:10 +0000 (08:06 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Sat, 12 Apr 2014 06:07:20 +0000 (08:07 +0200)
src/zoom-c.c

index 37b87f9..da0d867 100644 (file)
@@ -1974,9 +1974,11 @@ static void ZOOM_connection_do_io(ZOOM_connection c, int mask)
             else
             {
                 /* no init request for SRW .. */
-                assert(c->tasks->which == ZOOM_TASK_CONNECT);
-                ZOOM_connection_remove_task(c);
-                ZOOM_connection_set_mask(c, 0);
+                if (c->tasks->which == ZOOM_TASK_CONNECT)
+                {
+                    ZOOM_connection_remove_task(c);
+                    ZOOM_connection_set_mask(c, 0);
+                }
                 ZOOM_connection_exec_task(c);
             }
             c->state = STATE_ESTABLISHED;