Commit b0744617 authored by antirez's avatar antirez
Browse files

redis-cli pipe mode: handle EAGAIN while writing to socket.

parent f1af84d7
......@@ -962,9 +962,13 @@ static void pipeMode(void) {
ssize_t nwritten = write(fd,obuf+obuf_pos,obuf_len);
if (nwritten == -1) {
fprintf(stderr, "Error writing to the server: %s\n",
strerror(errno));
exit(1);
if (errno != EAGAIN) {
fprintf(stderr, "Error writing to the server: %s\n",
strerror(errno));
exit(1);
} else {
nwritten = 0;
}
}
obuf_len -= nwritten;
obuf_pos += nwritten;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment