From f7f11352b7fc22d69eae22ed424cf1122245b77a Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 21 Aug 2009 14:47:33 +0200 Subject: [PATCH] Don't Close TCP Connection/Server on destruction. If the connection is open when the destructor is called it's a bug! Don't want to try to compensate for bugs. --- src/net.cc | 1 - src/net.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/net.cc b/src/net.cc index adedb1e8e7..9c6646e3fb 100644 --- a/src/net.cc +++ b/src/net.cc @@ -117,7 +117,6 @@ Connection::~Connection () { assert(stream_.recvfd < 0 && "garbage collecting open Connection"); assert(stream_.sendfd < 0 && "garbage collecting open Connection"); - ForceClose(); } Handle diff --git a/src/net.h b/src/net.h index 404d22ea5e..593cacd439 100644 --- a/src/net.h +++ b/src/net.h @@ -139,7 +139,7 @@ protected: } virtual ~Server () { - evcom_server_close (&server_); + assert(server_.fd >= 0); } int Listen (struct sockaddr *address, int backlog) {