summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadelyn Olson <matolson@amazon.com>2020-05-21 15:20:59 -0700
committerantirez <antirez@gmail.com>2020-05-22 12:37:59 +0200
commite201f83cee54c74bb94894d49b0b306d5b087249 (patch)
tree58e774b8b2ee0bf9dd78ad4bbe5b431299083c28
parent58fc456cbdc1c4efd6dcef1d5e14b7daaa5a5f1e (diff)
downloadredis-e201f83cee54c74bb94894d49b0b306d5b087249.tar.gz
EAGAIN for tls during diskless load
-rw-r--r--src/replication.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/replication.c b/src/replication.c
index 7eb161f7d..7e981873f 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();