]> git.saurik.com Git - redis.git/commitdiff
suppress a Linux warning, for 2.2 sake
authorantirez <antirez@gmail.com>
Mon, 21 Feb 2011 16:50:54 +0000 (17:50 +0100)
committerantirez <antirez@gmail.com>
Mon, 21 Feb 2011 16:51:52 +0000 (17:51 +0100)
src/replication.c

index e55801006b133415c28a38489d52e1d6dd3402a5..b0fa7055672816a5289b04c8001648e3f191c209 100644 (file)
@@ -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. */
+                }
             }
         }
     }