From d2922a4ed459036340e4909eecb7659ebda502ab Mon Sep 17 00:00:00 2001 From: YaacovHazan Date: Sun, 9 Jul 2023 20:44:15 +0300 Subject: [PATCH] Issue #94, test hangs in cluster mode When a connection is dropped, it needs to empty its pipeline of pending responses, so in case of reconnection, it won't hang waiting for old requests. --- shard_connection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shard_connection.cpp b/shard_connection.cpp index b78ed312..bcf331ad 100644 --- a/shard_connection.cpp +++ b/shard_connection.cpp @@ -289,6 +289,10 @@ void shard_connection::disconnect() { } m_bev = NULL; + // empty pipeline + while (m_pending_resp) + delete pop_req(); + m_connection_state = conn_disconnected; // by default no need to send any setup request