Skip to content

Commit eaeb31e

Browse files
bjorijmikola
authored andcommitted
PHPC-487: Reverse logic in check_closed stream handler
The return value of the check_closed handler is true if the stream is closed.
1 parent e4471af commit eaeb31e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php_phongo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ bool phongo_stream_socket_check_closed(mongoc_stream_t *stream) /* {{{ */
916916
php_phongo_stream_socket *base_stream = (php_phongo_stream_socket *)stream;
917917
TSRMLS_FETCH_FROM_CTX(base_stream->tsrm_ls);
918918

919-
return PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(base_stream->stream, PHP_STREAM_OPTION_CHECK_LIVENESS, 0, NULL);
919+
return PHP_STREAM_OPTION_RETURN_OK != php_stream_set_option(base_stream->stream, PHP_STREAM_OPTION_CHECK_LIVENESS, 0, NULL);
920920
} /* }}} */
921921

922922
mongoc_stream_t* phongo_stream_get_base_stream(mongoc_stream_t *stream) /* {{{ */

0 commit comments

Comments
 (0)