From f96a9f82d813c9172d61fdabdc02368a42fb283b Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 21 Feb 2011 17:50:54 +0100 Subject: [PATCH] suppress a Linux warning, for 2.2 sake --- src/replication.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/replication.c b/src/replication.c index e5580100..b0fa7055 100644 --- a/src/replication.c +++ b/src/replication.c @@ -547,7 +547,9 @@ void replicationCron(void) { * connection last interaction time, and at the same time * we'll be sure that being a single char there are no * short-write problems. */ - write(slave->fd, "\n", 1); + if (write(slave->fd, "\n", 1) == -1) { + /* Don't worry, it's just a ping. */ + } } } }