Bib-1 and SRU diagnostics in manual (appendix) YAZ-748
[yaz-moved-to-github.git] / src / zoom-c.c
index d2b2be9..da0d867 100644 (file)
@@ -1563,6 +1563,7 @@ static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres)
                                           location, &host_change);
             if (do_connect_host(c, location) == zoom_complete)
                 return;  /* connect failed.. */
+            cs_rcvconnect(c->cs);
             send_HTTP_redirect(c, location);
             return;
         }
@@ -1973,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;