Skip to content

Commit 458a9cf

Browse files
author
Alexey Gadzhiev
committed
Disable reconnect in reconnect
1 parent 341c0c1 commit 458a9cf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tarantool/connection.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,12 @@ def check(): # Check that connection is alive
332332
raise NetworkError(
333333
socket.error(last_errno, errno.errorcode[last_errno]))
334334
attempt += 1
335-
336-
self.handshake()
335+
try:
336+
self.inconnect = True
337+
self.handshake()
338+
except:
339+
self.inconnect = False
340+
raise
337341
# It is important to set socket timeout *after* connection.
338342
# Otherwise the timeout exception will be raised, even when
339343
# the connection fails because the server is simply

0 commit comments

Comments
 (0)