Skip to content

Commit 1f93bc1

Browse files
YaacovHazanyaacovhazan-Redislabs
authored andcommitted
fix issue #108 cluster mode crash (#110)
disable the bufferevent only when connection state is 'connected'
1 parent 0f016e6 commit 1f93bc1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

shard_connection.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,11 @@ void shard_connection::fill_pipeline(void)
471471

472472
// don't exceed requests
473473
if (m_conns_manager->hold_pipeline(m_id)) {
474-
bufferevent_disable(m_bev, EV_WRITE|EV_READ);
474+
// if we are still connected, disable any event
475+
if (get_connection_state() == conn_connected) {
476+
bufferevent_disable(m_bev, EV_WRITE|EV_READ);
477+
}
478+
475479
break;
476480
}
477481

0 commit comments

Comments
 (0)