Closed ghost closed 8 years ago
setdefaulttimeout() is a socket function, I believe the M2crypto connection has settimeout() that does something similar
Yes you're right that using sslconn.settimeout is better. I have done some testing now and socket.setdefaulttimeout doesn't even do anything. It's good to set sslconn.settimeout because even though when a host doesn't respond it times out because of the read timeout, the error message with sslconn.settimeout changes from "urlopen error (115, 'Operation now in progress')" to "urlopen error timed out" which is more descriptive.
Also I think 60 seconds is too long -- please change the timeouts to 15.
I just tested cigetcert on Debian for the first time, and found that the sslconn.settimeout function was missing. I'm not sure yet what to do about it. That was just about the only change needed other than the path for the cafile.
Examples I see, for example this one say to also set sslconn.setdefaulttimeout() to cover the original connection. Could you please add that?
Also while you're at it, please change tab characters to blanks.