Merge pull request #7305 from madolson/unstable-connection

EAGAIN not handled for TLS during diskless load
This commit is contained in:
Salvatore Sanfilippo 2020-05-22 12:25:40 +02:00 committed by GitHub
commit 285817b28a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1526,6 +1526,10 @@ void readSyncBulkPayload(connection *conn) {
nread = connRead(conn,buf,readlen); nread = connRead(conn,buf,readlen);
if (nread <= 0) { 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", serverLog(LL_WARNING,"I/O error trying to sync with MASTER: %s",
(nread == -1) ? strerror(errno) : "connection lost"); (nread == -1) ? strerror(errno) : "connection lost");
cancelReplicationHandshake(); cancelReplicationHandshake();