diff options
author | neon <neon@nika> | 2012-08-06 22:42:08 +0400 |
---|---|---|
committer | neon <neon@nika> | 2012-08-06 22:42:08 +0400 |
commit | dedee1f7aeb68535f8c8c1a174f584871713c38f (patch) | |
tree | 5f328c027bf816a734aa8b7258e709212d98c8f4 /library.c | |
parent | f3dff08cfaf5d6a7a78bd87e70ee19c92f0ad27d (diff) |
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; |