Skip to content

Commit

Permalink
Tweak call to setsockopt in redis_setoption_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-grunder committed Oct 24, 2017
1 parent 5101172 commit 010336d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redis_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -3126,8 +3126,8 @@ void redis_setoption_handler(INTERNAL_FUNCTION_PARAMETERS,
if(redis_sock->stream) {
/* set TCP_KEEPALIVE */
sock = (php_netstream_data_t*)redis_sock->stream->abstract;
if (setsockopt(sock->socket, SOL_SOCKET, SO_KEEPALIVE, (const void*) &tcp_keepalive,
sizeof(int)) == -1) {
if (setsockopt(sock->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&tcp_keepalive,
sizeof(tcp_keepalive)) == -1) {
RETURN_FALSE;
}
redis_sock->tcp_keepalive = tcp_keepalive;
Expand Down

0 comments on commit 010336d

Please sign in to comment.