[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Set the default socket timeout to 30 seconds.
commit 7daa7f2208542e55c617e542f0be322f52d103e4
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Thu Feb 28 04:02:24 2013 +0000
Set the default socket timeout to 30 seconds.
---
nettests/experimental/tls_handshake.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/nettests/experimental/tls_handshake.py b/nettests/experimental/tls_handshake.py
index 8bd4820..2c11122 100644
--- a/nettests/experimental/tls_handshake.py
+++ b/nettests/experimental/tls_handshake.py
@@ -141,9 +141,13 @@ class TLSHandshakeTest(nettest.NetTestCase):
if getattr(config.advanced, 'default_timeout', None) is not None:
self.timeout = config.advanced.default_timeout
else:
- timeout = 10 ## default the timeout to 10 seconds
- socket.setdefaulttimeout(timeout)
- self.timeout = struct.pack('ll', int(timeout), 0)
+ self.timeout = 30 ## default the timeout to 30 seconds
+
+ ## xxx For debugging, set the socket timeout higher anyway:
+ self.timeout = 30
+
+ ## We have to set the default timeout on our sockets before creation:
+ socket.setdefaulttimeout(self.timeout)
def splitInput(self, input):
addr, port = input.strip().rsplit(':', 1)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits