瀏覽代碼

bugfix: an offline OP would leak all its sockets and stop working

svn:r865
Roger Dingledine 22 年之前
父節點
當前提交
00de055f43
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/or/connection.c

+ 1 - 0
src/or/connection.c

@@ -274,6 +274,7 @@ int connection_connect(connection_t *conn, char *address, uint32_t addr, uint16_
       /* yuck. kill it. */
       perror("connect");
       log_fn(LOG_INFO,"Connect() to %s:%u failed.",address,port);
+      close(s);
       return -1;
     } else {
       /* it's in progress. set state appropriately and return. */