diff options
Diffstat (limited to 'src/replication.c')
-rw-r--r-- | src/replication.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/replication.c b/src/replication.c index 3674bea05..a57cd8528 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1837,7 +1837,7 @@ void readSyncBulkPayload(connection *conn) { if (nread == -1) { serverLog(LL_WARNING, "I/O error reading bulk count from MASTER: %s", - strerror(errno)); + connGetLastError(conn)); goto error; } else { /* nread here is returned by connSyncReadLine(), which calls syncReadLine() and @@ -1909,7 +1909,7 @@ void readSyncBulkPayload(connection *conn) { return; } serverLog(LL_WARNING,"I/O error trying to sync with MASTER: %s", - (nread == -1) ? strerror(errno) : "connection lost"); + (nread == -1) ? connGetLastError(conn) : "connection lost"); cancelReplicationHandshake(1); return; } @@ -2254,7 +2254,7 @@ char *receiveSynchronousResponse(connection *conn) { /* Read the reply from the server. */ if (connSyncReadLine(conn,buf,sizeof(buf),server.repl_syncio_timeout*1000) == -1) { - serverLog(LL_WARNING, "Failed to read response from the server: %s", strerror(errno)); + serverLog(LL_WARNING, "Failed to read response from the server: %s", connGetLastError(conn)); return NULL; } server.repl_transfer_lastio = server.unixtime; @@ -2815,7 +2815,7 @@ void syncWithMaster(connection *conn) { serverLog(LL_NOTICE,"Retrying with SYNC..."); if (connSyncWrite(conn,"SYNC\r\n",6,server.repl_syncio_timeout*1000) == -1) { serverLog(LL_WARNING,"I/O error writing to MASTER: %s", - strerror(errno)); + connGetLastError(conn)); goto error; } } |