Wierd M2Crypto bug - phony "peer did not return certificate" error

Heikki Toivonen heikki at osafoundation.org
Fri Jan 12 20:06:47 EST 2007


John Nagle wrote:
> def connect(self, addr):
>     self.socket.connect(addr)
>     self.addr = addr
>     self.socket.settimeout(None) # Back to normal timeout (NEW)

I am not sure if this is always appropriate. In fact, doesn't this just
eliminate the timeout completely from this connection?

In your case you could achieve what you want by calling
connection_object.socket.settimeout(4.0) method just before calling
connect, without needing to edit M2Crypto itself.

setdefaulttimeout, socket.settimeout and socket.setblocking are pretty
confusing...

-- 
  Heikki Toivonen



More information about the Python-list mailing list