Browse Source

Do not call Detach() from Server::~Server.

v0.7.4-release
Ryan 16 years ago
parent
commit
51e77c37b5
  1. 5
      src/net.h
  2. 2
      src/object_wrap.h

5
src/net.h

@ -128,7 +128,10 @@ protected:
server_.on_connection = Server::on_connection;
server_.data = this;
}
virtual ~Server () { Close(); }
virtual ~Server () {
oi_server_close (&server_);
}
int Listen (struct addrinfo *address) {
int r = oi_server_listen (&server_, address);

2
src/object_wrap.h

@ -55,6 +55,8 @@ class ObjectWrap {
* the object after making this call as it might be gone!
* (A "weak reference" is v8 terminology for an object that only has a
* persistant handle.)
*
* DO NOT CALL THIS FROM DESTRUCTOR
*/
void Detach() {
assert(!handle_.IsEmpty());

Loading…
Cancel
Save