mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
slave now detect lost connection during SYNC, fixing Issue 173
This commit is contained in:
parent
778b2210a9
commit
b91d605a35
@ -428,9 +428,9 @@ int syncWithMaster(void) {
|
||||
int nread, nwritten;
|
||||
|
||||
nread = read(fd,buf,(dumpsize < 1024)?dumpsize:1024);
|
||||
if (nread == -1) {
|
||||
if (nread <= 0) {
|
||||
redisLog(REDIS_WARNING,"I/O error trying to sync with MASTER: %s",
|
||||
strerror(errno));
|
||||
(nread == -1) ? strerror(errno) : "connection lost");
|
||||
close(fd);
|
||||
close(dfd);
|
||||
return REDIS_ERR;
|
||||
|
Loading…
x
Reference in New Issue
Block a user