Skip to content

Commit b35109e

Browse files
committed
Added handling of error when trying to connect to the wrong port
1 parent 12bd86f commit b35109e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neo4j/v1/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def connect(host, port=None, ssl_context=None, **config):
379379
try:
380380
s = create_connection((host, port))
381381
except SocketError as error:
382-
if error.errno == 111:
382+
if error.errno == 111 or error.errno == 61:
383383
raise ProtocolError("Unable to connect to %s on port %d - is the server running?" % (host, port))
384384
else:
385385
raise

0 commit comments

Comments
 (0)