This repository was archived by the owner on Sep 16, 2024. It is now read-only.
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
usocket.connect() to down server ignores timeout and no exception thrown #34
Open
Description
WiPy 2.0
v1.8.6-650-g9bacbbd4 on 2017-06-09'
When I attempt to make a socket connection to a machine that is down the timeout value is completely ignored and connect() doesn't throw an exception.
Example code:
import time
import socket
def test1():
start = time.time()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
s.settimeout(3)
s.connect(('192.168.1.120', 15000))
finish = time.time()
print(finish - start)
s.close()
This takes 18-19 seconds and throws no exception.
Metadata
Metadata
Assignees
Labels
No labels