Make check_proxy, you know ... work
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 25 Apr 2012 07:47:59 +0000 (09:47 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 25 Apr 2012 07:47:59 +0000 (09:47 +0200)
src/filter_zoom.cpp

index 194fb8b..41a8aca 100644 (file)
@@ -1878,7 +1878,7 @@ static bool wait_conn(COMSTACK cs, int secs)
     yaz_poll_add(pfd.input_mask, yaz_poll_except);
     if (cs->io_pending && CS_WANT_WRITE)
         yaz_poll_add(pfd.input_mask, yaz_poll_write);
-    else if (cs->io_pending & CS_WANT_READ)
+    if (cs->io_pending & CS_WANT_READ)
         yaz_poll_add(pfd.input_mask, yaz_poll_read);
 
     pfd.fd = cs_fileno(cs);
@@ -1919,6 +1919,8 @@ bool yf::Zoom::Impl::check_proxy(const char *proxy)
                 if (!wait_conn(conn, proxy_timeout))
                     break;
             }
+            if (ret == 0)
+                outcome = true;
         }
     }
     cs_close(conn);