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
3f95fcda
Commit
3f95fcda
authored
Apr 14, 2023
by
michael-grunder
Committed by
Michael Grunder
Apr 14, 2023
Browse files
Don't attempt to set a timeout if we are in an error state.
parent
aacb84b8
Changes
1
Show whitespace changes
Inline
Side-by-side
hiredis.c
View file @
3f95fcda
...
@@ -860,7 +860,9 @@ redisContext *redisConnectWithOptions(const redisOptions *options) {
...
@@ -860,7 +860,9 @@ redisContext *redisConnectWithOptions(const redisOptions *options) {
return
NULL
;
return
NULL
;
}
}
if
(
options
->
command_timeout
!=
NULL
&&
(
c
->
flags
&
REDIS_BLOCK
)
&&
c
->
fd
!=
REDIS_INVALID_FD
)
{
if
(
c
->
err
==
0
&&
c
->
fd
!=
REDIS_INVALID_FD
&&
options
->
command_timeout
!=
NULL
&&
(
c
->
flags
&
REDIS_BLOCK
))
{
redisContextSetTimeout
(
c
,
*
options
->
command_timeout
);
redisContextSetTimeout
(
c
,
*
options
->
command_timeout
);
}
}
...
...
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