[New-bugs-announce] [issue5293] socket timeouts even in blocking mode
anatoly techtonik
report at bugs.python.org
Tue Feb 17 11:06:34 CET 2009
New submission from anatoly techtonik <techtonik at gmail.com>:
The code below exits with timeout after about 20 secs on Windows +
Python 2.5.4
import socket
# address of server routable, but offline
server = "192.168.1.2"
s = socket.socket()
s.setblocking(1)
s.connect((server, 139))
s.close()
The output is:
Traceback (most recent call last):
File "D:\.env\test.py", line 6, in <module>
s.connect((server, 139))
File "<string>", line 1, in connect
socket.error: (10060, 'Operation timed out')
If timeout is set to 1 it exits almost immediately. If timeout is large
it waits for about 20 seconds and exits.
I use socket to wait for the network service to appear. The target
machine 192.168.1.2 belongs to local network, but offline.
----------
components: Library (Lib), Windows
messages: 82311
nosy: techtonik
severity: normal
status: open
title: socket timeouts even in blocking mode
versions: Python 2.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5293>
_______________________________________
More information about the New-bugs-announce
mailing list