Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 010336d

Browse files
Tweak call to setsockopt in redis_setoption_handler
1 parent 5101172 commit 010336d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

redis_commands.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,8 +3126,8 @@ void redis_setoption_handler(INTERNAL_FUNCTION_PARAMETERS,
31263126
if(redis_sock->stream) {
31273127
/* set TCP_KEEPALIVE */
31283128
sock = (php_netstream_data_t*)redis_sock->stream->abstract;
3129-
if (setsockopt(sock->socket, SOL_SOCKET, SO_KEEPALIVE, (const void*) &tcp_keepalive,
3130-
sizeof(int)) == -1) {
3129+
if (setsockopt(sock->socket, SOL_SOCKET, SO_KEEPALIVE, (char*)&tcp_keepalive,
3130+
sizeof(tcp_keepalive)) == -1) {
31313131
RETURN_FALSE;
31323132
}
31333133
redis_sock->tcp_keepalive = tcp_keepalive;

0 commit comments

Comments
 (0)