Skip to content

Commit

Permalink
Minor change to setsockopt
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-grunder committed Oct 24, 2017
1 parent 29ecb04 commit 5101172
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,9 +1474,9 @@ PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock TSRMLS_DC)
/* Attempt to set TCP_NODELAY/TCP_KEEPALIVE if we're not using a unix socket. */
sock = (php_netstream_data_t*)redis_sock->stream->abstract;
if (!usocket) {
err = setsockopt(sock->socket, IPPROTO_TCP, TCP_NODELAY, (char *) &tcp_flag, sizeof(int));
err = setsockopt(sock->socket, IPPROTO_TCP, TCP_NODELAY, (char*) &tcp_flag, sizeof(tcp_flag));
PHPREDIS_NOTUSED(err);
err = setsockopt(sock->socket, SOL_SOCKET, SO_KEEPALIVE, (const void *) &redis_sock->tcp_keepalive, sizeof(int));
err = setsockopt(sock->socket, SOL_SOCKET, SO_KEEPALIVE, (char*) &redis_sock->tcp_keepalive, sizeof(redis_sock->tcp_keepalive));
PHPREDIS_NOTUSED(err);
}

Expand Down

0 comments on commit 5101172

Please sign in to comment.