-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
featureA new functionalityA new functionality
Description
When a remote server does not respond, the connection times out longer than Connection. socket_timeout.
nmap -Pn 10.0.0.1 -p 3301
Starting Nmap 7.50 ( https://nmap.org ) at 2019-03-04 18:02 MSK
Nmap scan report for 10.0.0.1
Host is up.
PORT STATE SERVICE
3301/tcp filtered unknown
Nmap done: 1 IP address (1 host up) scanned in 3.92 seconds
time python -c '
import tarantool
try:
tarantool.Connection("10.0.0.1", 3301, socket_timeout=1, reconnect_max_attempts=0)
except Exception as e:
print(e.__class__.__name__, e)
'
NetworkError (60, 'Operation timed out')
python -c 0.08s user 0.03s system 0% cpu 1:20.06 total
The problem is here
tarantool-python/tarantool/connection.py
Line 199 in 18bf408
| # It is important to set socket timeout *after* connection. |
Expected behavior:
NetworkError should be raised after Connection.socket_timeout has passed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureA new functionalityA new functionality