Skip to content

Commit

Permalink
Issue RedisLabs#94, test hangs in cluster mode
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
YaacovHazan committed Jul 9, 2023
1 parent d5ac1f4 commit d2922a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shard_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2922a4

Please sign in to comment.