timeout on the socket

This commit is contained in:
Yann Leboulanger 2004-05-01 20:53:34 +00:00
parent 7931064c1e
commit bc63bc73b7
1 changed files with 1 additions and 0 deletions

View File

@ -460,6 +460,7 @@ class Client(Stream):
return
self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self._sock.settimeout(10)
try:
if self._proxy: self._sock.connect((self._proxy['host'], self._proxy['port']))
else: self._sock.connect((self._hostIP, self._port))