Skip to content

Commit d2922a4

Browse files
committed
Issue RedisLabs#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.
1 parent d5ac1f4 commit d2922a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shard_connection.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ void shard_connection::disconnect() {
289289
}
290290
m_bev = NULL;
291291

292+
// empty pipeline
293+
while (m_pending_resp)
294+
delete pop_req();
295+
292296
m_connection_state = conn_disconnected;
293297

294298
// by default no need to send any setup request

0 commit comments

Comments
 (0)