mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
Fixed issue 72 (SLAVEOF shutdowns redis-server on malformed reply)
This commit is contained in:
parent
6c9385e01d
commit
4aa701c11a
5
redis.c
5
redis.c
@ -5071,6 +5071,11 @@ static int syncWithMaster(void) {
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
return REDIS_ERR;
|
return REDIS_ERR;
|
||||||
}
|
}
|
||||||
|
if (buf[0] != '$') {
|
||||||
|
close(fd);
|
||||||
|
redisLog(REDIS_WARNING,"Bad protocol from MASTER, the first byte is not '$', are you sure the host and port are right?");
|
||||||
|
return REDIS_ERR;
|
||||||
|
}
|
||||||
dumpsize = atoi(buf+1);
|
dumpsize = atoi(buf+1);
|
||||||
redisLog(REDIS_NOTICE,"Receiving %d bytes data dump from MASTER",dumpsize);
|
redisLog(REDIS_NOTICE,"Receiving %d bytes data dump from MASTER",dumpsize);
|
||||||
/* Read the bulk write data on a temp file */
|
/* Read the bulk write data on a temp file */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user