Fix write() errno error

This commit is contained in:
shenlongxing
2018-06-04 23:59:21 +08:00
committed by antirez
parent b61416bdf4
commit c85ae56edc
3 changed files with 6 additions and 5 deletions

View File

@ -2120,7 +2120,7 @@ void clusterWriteHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
nwritten = write(fd, link->sndbuf, sdslen(link->sndbuf));
if (nwritten <= 0) {
serverLog(LL_DEBUG,"I/O error writing to node link: %s",
strerror(errno));
(nwritten == -1) ? strerror(errno) : "short write");
handleLinkIOError(link);
return;
}