summaryrefslogtreecommitdiff
path: root/src/replication.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/replication.c')
-rw-r--r--src/replication.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/replication.c b/src/replication.c
index b10635f25..6483d296c 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -1526,6 +1526,10 @@ void readSyncBulkPayload(connection *conn) {
nread = connRead(conn,buf,readlen);
if (nread <= 0) {
+ if (connGetState(conn) == CONN_STATE_CONNECTED) {
+ /* equivalent to EAGAIN */
+ return;
+ }
serverLog(LL_WARNING,"I/O error trying to sync with MASTER: %s",
(nread == -1) ? strerror(errno) : "connection lost");
cancelReplicationHandshake();