Skip to content

Commit

Permalink
Option SNDTIMEO should be used for write timeout (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
elnull committed May 6, 2020
1 parent 3a30088 commit fbf052e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/redisclient/impl/redisclientimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ namespace
{
struct timeval tv = {static_cast<time_t>(timeoutMsec / 1000),
static_cast<__suseconds_t>((timeoutMsec % 1000) * 1000)};
int result = setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
int result = setsockopt(socket, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));

if (result != 0)
{
Expand Down

0 comments on commit fbf052e

Please sign in to comment.