Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Handle server death before close().

  • Loading branch information...
commit da074dda313685679607f550a470ab97b5079b90 1 parent 85e4746
@nicolasff nicolasff authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 library.c
View
4 library.c
@@ -777,7 +777,9 @@ PHPAPI int redis_sock_disconnect(RedisSock *redis_sock TSRMLS_DC)
redis_sock_write(redis_sock, "QUIT", sizeof("QUIT") - 1 TSRMLS_CC);
redis_sock->status = REDIS_SOCK_STATUS_DISCONNECTED;
- php_stream_close(redis_sock->stream);
+ if(redis_sock->stream) { /* still valid after the write? */
+ php_stream_close(redis_sock->stream);
+ }
redis_sock->stream = NULL;
res = 1;

0 comments on commit da074dd

Please sign in to comment.
Something went wrong with that request. Please try again.