mercurial/httpclient/__init__.py
changeset 16774 69af967b6d6f
parent 16643 24dbef11f477
child 17424 e7cfe3587ea4
child 17536 dc6364a81e42
--- a/mercurial/httpclient/__init__.py	Mon May 21 00:20:05 2012 +0200
+++ b/mercurial/httpclient/__init__.py	Fri May 18 17:05:17 2012 -0500
@@ -372,6 +372,10 @@
         else:
             sock = socketutil.create_connection((self.host, self.port))
         if self.ssl:
+            # This is the default, but in the case of proxied SSL
+            # requests the proxy logic above will have cleared
+            # blocking mode, so reenable it just to be safe.
+            sock.setblocking(1)
             logger.debug('wrapping socket for ssl with options %r',
                          self.ssl_opts)
             sock = socketutil.wrap_socket(sock, **self.ssl_opts)