-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
import socket
import time
start = time.time()
sock = socket.create_connection(
address=("foobar", 10000),
timeout=5)
print(time.time() - start)
No matter what value you specify as a timeout, the timeout is always doubled. If you specify 5 seconds, an exception will only be thrown after 10 seconds; if you specify 10 seconds, then only after 20.
Tested on Debian 12 with Python 3.11.
CPython versions tested on:
3.11
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error