diff options
author | Nicolas Favre-Felix <n.favrefelix@gmail.com> | 2012-08-29 11:41:51 +0400 |
---|---|---|
committer | Nicolas Favre-Felix <n.favrefelix@gmail.com> | 2012-08-29 11:41:51 +0400 |
commit | 9c224410f32668a30565db7c1053253f8c753a2e (patch) | |
tree | ebdb118a8970ca37886216a24e314367263f85db /library.c | |
parent | e8c3b13b682ea3c24819aa9aaab6d774c59875ea (diff) | |
parent | dedee1f7aeb68535f8c8c1a174f584871713c38f (diff) |
Merge pull request #225 from pavel-krush/master
Fix segfault when using persistent connections
Diffstat (limited to 'library.c')
-rw-r--r-- | library.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -41,7 +41,7 @@ PHPAPI int redis_check_eof(RedisSock *redis_sock TSRMLS_DC) for (; eof; count++) { if((MULTI == redis_sock->mode) || redis_sock->watching || count == 10) { /* too many failures */ if(redis_sock->stream) { /* close stream if still here */ - php_stream_close(redis_sock->stream); + redis_stream_close(redis_sock); redis_sock->stream = NULL; redis_sock->mode = ATOMIC; redis_sock->status = REDIS_SOCK_STATUS_FAILED; @@ -51,7 +51,7 @@ PHPAPI int redis_check_eof(RedisSock *redis_sock TSRMLS_DC) return -1; } if(redis_sock->stream) { /* close existing stream before reconnecting */ - php_stream_close(redis_sock->stream); + redis_stream_close(redis_sock); redis_sock->stream = NULL; redis_sock->mode = ATOMIC; redis_sock->watching = 0; |