Commits

Denis Bilenko committed 51828dc

httplib: fix issue #80: timeout, if provided, was reset to 1 second. Patch by Tomasz Prus.

  • Participants
  • Parent commits fb52e85

Comments (0)

Files changed (1)

File gevent/httplib.py

         self.conn = core.http_connection.new(self.host, self.port)
 
         if self.timeout is not None:
-            self.conn.set_timeout(int(min(1, self.timeout)))
+            self.conn.set_timeout(int(max(1, self.timeout)))
 
     def close(self):
         self.resp = None