This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information...
ry committed Aug 21, 2009
1 parent 048a1b8 commit f7f11352b7fc22d69eae22ed424cf1122245b77a
Showing with 1 addition and 2 deletions.
  1. +0 −1 src/net.cc
  2. +1 −1 src/net.h
View
@@ -117,7 +117,6 @@ Connection::~Connection ()
{
assert(stream_.recvfd < 0 && "garbage collecting open Connection");
assert(stream_.sendfd < 0 && "garbage collecting open Connection");
- ForceClose();
}
Handle<Value>
View
@@ -139,7 +139,7 @@ class Server : public EventEmitter {
}
virtual ~Server () {
- evcom_server_close (&server_);
+ assert(server_.fd >= 0);
}
int Listen (struct sockaddr *address, int backlog) {

0 comments on commit f7f1135

Please sign in to comment.