While restoring the database connections due to lost server connection, ensure that the databases which were previously connected are only reconnected. #5919

This commit is contained in:
Yogesh Mahajan
2023-03-24 14:33:45 +05:30
committed by GitHub
parent 5cb64f7602
commit f1aa82ad36

View File

@@ -111,7 +111,8 @@ class ServerHeartbeatTimer():
def _release_connections(server_conn, sess_id, sid):
for d in server_conn:
try:
# Release the connection
# Release the connection only if it is connected
if server_conn[d].wasConnected:
server_conn[d]._release()
# Reconnect on the reload
server_conn[d].wasConnected = True