* if is_https don't set nonblocking.
authorWilfried Göesgens <willi@citadel.org>
Sat, 3 Oct 2009 19:17:10 +0000 (19:17 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 3 Oct 2009 19:17:10 +0000 (19:17 +0000)
webcit/tcp_sockets.c

index 3e3194b341859ff8a729d0eb66a838c490f7dd75..841021ee271f010bc64e54ce6e761aaa6a075590 100644 (file)
@@ -120,15 +120,16 @@ int tcp_connectsock(char *host, char *service)
        }
        alarm(0);
        signal(SIGALRM, SIG_IGN);
-
-       fdflags = fcntl(s, F_GETFL);
-       if (fdflags < 0)
-               lprintf(1, "unable to get socket flags!  %s.%s: %s \n",
-                       host, service, strerror(errno));
-       fdflags = fdflags | O_NONBLOCK;
-       if (fcntl(s, F_SETFD, fdflags) < 0)
-               lprintf(1, "unable to set socket nonblocking flags!  %s.%s: %s \n",
-                       host, service, strerror(errno));
+       if (!is_https) {
+               fdflags = fcntl(s, F_GETFL);
+               if (fdflags < 0)
+                       lprintf(1, "unable to get socket flags!  %s.%s: %s \n",
+                               host, service, strerror(errno));
+               fdflags = fdflags | O_NONBLOCK;
+               if (fcntl(s, F_SETFD, fdflags) < 0)
+                       lprintf(1, "unable to set socket nonblocking flags!  %s.%s: %s \n",
+                               host, service, strerror(errno));
+       }
        return (s);
 }