We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c18dcca commit 4cf7677Copy full SHA for 4cf7677
library.c
@@ -31,8 +31,13 @@ PHPAPI void redis_stream_close(RedisSock *redis_sock TSRMLS_DC) {
31
32
PHPAPI int redis_check_eof(RedisSock *redis_sock TSRMLS_DC)
33
{
34
- int eof = php_stream_eof(redis_sock->stream);
+ int eof;
35
int count = 0;
36
+
37
+ if (!redis_sock->stream)
38
+ return -1;
39
40
+ eof = php_stream_eof(redis_sock->stream);
41
while(eof) {
42
if((MULTI == redis_sock->mode) || redis_sock->watching || count++ == 10) { /* too many failures */
43
if(redis_sock->stream) { /* close stream if still here */
0 commit comments