Skip to content

Commit

Permalink
CID 157208
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Jul 20, 2017
1 parent 735025d commit 26eeda5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1466,8 +1466,9 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock TSRMLS_DC)

/* set TCP_NODELAY */
sock = (php_netstream_data_t*)redis_sock->stream->abstract;
setsockopt(sock->socket, IPPROTO_TCP, TCP_NODELAY, (char *) &tcp_flag,
sizeof(int));
if (setsockopt(sock->socket, IPPROTO_TCP, TCP_NODELAY, (char *) &tcp_flag, sizeof(int)) < 0) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Can't activate TCP_NODELAY option!");
}

php_stream_auto_cleanup(redis_sock->stream);

Expand Down

0 comments on commit 26eeda5

Please sign in to comment.