summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadelyn Olson <matolson@amazon.com>2020-05-21 15:20:59 -0700
committerMadelyn Olson <matolson@amazon.com>2020-05-21 15:20:59 -0700
commit5109f16b7742866251701d61a7a7cbe5fd2d261c (patch)
tree589bad2f55c4a4404c641424b512a9142795d555
parentfe640e5858c57ea23bbcbacacb715ecade99ef23 (diff)
downloadredis-5109f16b7742866251701d61a7a7cbe5fd2d261c.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 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();