If forwarded-connect-retries is set, only retry if the we are actually forwarding...
authorFabian Keil <fk@fabiankeil.de>
Sun, 27 Mar 2011 14:08:35 +0000 (14:08 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sun, 27 Mar 2011 14:08:35 +0000 (14:08 +0000)
jbsockets.c

index efc344c..d25ed88 100644 (file)
@@ -1,4 +1,4 @@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.96 2011/03/27 14:03:43 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.97 2011/03/27 14:04:10 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@ -157,7 +157,8 @@ jb_socket connect_to(const char *host, int portnum, struct client_state *csp)
 #else
       fd = no_rfc2553_connect_to(host, portnum, csp);
 #endif
-      if ((fd != JB_INVALID_SOCKET) || (errno != EINVAL))
+      if ((fd != JB_INVALID_SOCKET) || (errno == EINVAL)
+         || ((csp->fwd->forward_host == NULL) && (csp->fwd->type == SOCKS_NONE)))
       {
          break;
       }