Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
8e61d573
Commit
8e61d573
authored
Aug 12, 2019
by
Sangmoon Yi
Browse files
add recv error code for clarifying timeout
parent
ab1762cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
net.c
View file @
8e61d573
...
...
@@ -63,6 +63,10 @@ int redisNetRead(redisContext *c, char *buf, size_t bufcap) {
if
((
errno
==
EWOULDBLOCK
&&
!
(
c
->
flags
&
REDIS_BLOCK
))
||
(
errno
==
EINTR
))
{
/* Try again later */
return
0
;
}
else
if
(
errno
==
ETIMEDOUT
&&
(
c
->
flags
&
REDIS_BLOCK
))
{
/* especially in windows */
__redisSetError
(
c
,
REDIS_ERR_TIMEOUT
,
"recv timeout"
);
return
-
1
;
}
else
{
__redisSetError
(
c
,
REDIS_ERR_IO
,
NULL
);
return
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment