Skip to content

Commit 85b11ff

Browse files
committed
Fix stuck autoreconnect case
When we call ping() at a not connected socket the following call trace is proceeded: ping() -> _send_request() -> _opt_reconnect() -> {here self.socket is None} -> connect() -> {inconnect is set to True} -> connect_basic() -> connect_tcp() -> raise NetworkError -> fall though try-except in connect() -> use null self._socket when try to send a packet. A test case ('test_01_simple') will be added within the following commit.
1 parent f4aa278 commit 85b11ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tarantool/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def connect(self):
206206
self.handshake()
207207
self.load_schema()
208208
self.inconnect = False
209-
except socket.error as e:
209+
except Exception as e:
210210
self.connected = False
211211
self.inconnect = False
212212
raise NetworkError(e)

0 commit comments

Comments
 (0)