Merge pull request #156 from ccvca/fix_segfault_disconnect_subscription

Fix crash when subscribed connections are closed #155
master
Nicolas Favre-Felix 6 years ago committed by GitHub
commit abb46831a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -291,7 +291,8 @@ http_client_read(struct http_client *c) {
/* disconnect from all channels */
redisAsyncDisconnect(c->pub_sub->ac);
if(c->pub_sub) c->pub_sub->ac = NULL;
// c->pub_sub might be already cleared by an event handler in redisAsyncDisconnect
cmd->ac = NULL;
c->pub_sub = NULL;
/* delete command object */

Loading…
Cancel
Save