Commit ae3aeca8 authored by antirez's avatar antirez
Browse files

MIGRATE: fix fd leak due to missing close on error.

parent 5a8234d2
...@@ -158,6 +158,7 @@ void migrateCommand(redisClient *c) { ...@@ -158,6 +158,7 @@ void migrateCommand(redisClient *c) {
return; return;
} }
if ((aeWait(fd,AE_WRITABLE,timeout*1000) & AE_WRITABLE) == 0) { if ((aeWait(fd,AE_WRITABLE,timeout*1000) & AE_WRITABLE) == 0) {
close(fd);
addReplySds(c,sdsnew("-IOERR error or timeout connecting to the client\r\n")); addReplySds(c,sdsnew("-IOERR error or timeout connecting to the client\r\n"));
return; return;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment