Commit 21b3ff9b authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo
Browse files

Merge pull request #893 from nparry/fix-redis-cli-rdb

redis-cli --rdb fails if server sends a ping
parents a0c24821 1920cab3
...@@ -958,8 +958,8 @@ unsigned long long sendSync(int fd) { ...@@ -958,8 +958,8 @@ unsigned long long sendSync(int fd) {
fprintf(stderr,"Error reading bulk length while SYNCing\n"); fprintf(stderr,"Error reading bulk length while SYNCing\n");
exit(1); exit(1);
} }
if (*p == '\n') break; if (*p == '\n' && p != buf) break;
p++; if (*p != '\n') p++;
} }
*p = '\0'; *p = '\0';
if (buf[0] == '-') { if (buf[0] == '-') {
......
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