Skip to content

Commit 5ae1771

Browse files
author
Peter Wilhelmsson
committed
Fix problem with failed retriable transactions in cluster
During rolling upgrades of clusters the handshake can be interrupted and a read during handshake can fail, this should be retried. Change the exception raised for this condition.
1 parent 56767d5 commit 5ae1771

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neo4j/io/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ def _handshake(s, resolved_address):
10091009
# response, the server has closed the connection
10101010
log.debug("[#%04X] S: <CLOSE>", local_port)
10111011
s.close()
1012-
raise BoltHandshakeError("Connection to {address} closed without handshake response".format(address=resolved_address), address=resolved_address, request_data=handshake, response_data=None)
1012+
raise ServiceUnavailable("Connection to {address} closed without handshake response".format(address=resolved_address))
10131013
if data_size != 4:
10141014
# Some garbled data has been received
10151015
log.debug("[#%04X] S: @*#!", local_port)

0 commit comments

Comments
 (0)