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
9df327e8
Commit
9df327e8
authored
Jan 26, 2013
by
Pieter Noordhuis
Browse files
Merge pull request #119 from thefab/fix99
Try again later for EINTR errors (see issue #99)
parents
3c46b13a
bf161d99
Changes
1
Hide whitespace changes
Inline
Side-by-side
hiredis.c
View file @
9df327e8
...
...
@@ -1077,7 +1077,7 @@ int redisBufferRead(redisContext *c) {
nread = read(c->fd,buf,sizeof(buf));
if (nread == -1) {
if
(
errno
==
EAGAIN
&&
!
(
c
->
flags
&
REDIS_BLOCK
))
{
if
(
(errno == EAGAIN && !(c->flags & REDIS_BLOCK))
|| (errno == EINTR))
{
/* Try again later */
} else {
__redisSetError(c,REDIS_ERR_IO,NULL);
...
...
@@ -1114,7 +1114,7 @@ int redisBufferWrite(redisContext *c, int *done) {
if (sdslen(c->obuf) > 0) {
nwritten = write(c->fd,c->obuf,sdslen(c->obuf));
if (nwritten == -1) {
if
(
errno
==
EAGAIN
&&
!
(
c
->
flags
&
REDIS_BLOCK
))
{
if
(
(errno == EAGAIN && !(c->flags & REDIS_BLOCK))
|| (errno == EINTR))
{
/* Try again later */
} else {
__redisSetError(c,REDIS_ERR_IO,NULL);
...
...
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