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

Make sure that zlib contexts are not garbage collected when busy

  • Loading branch information...
1 parent 2d8af39 commit 0ad2717fd88e5ddd28a1c245c78b37bfe9aa4197 @bnoordhuis bnoordhuis committed with piscisaureus Jan 10, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/node_zlib.cc
View
@@ -134,6 +134,7 @@ template <node_zlib_mode mode> class ZCtx : public ObjectWrap {
ZCtx<mode>::After);
req_wrap->Dispatched();
+ ctx->Ref();
return req_wrap->object_;
}
@@ -191,6 +192,7 @@ template <node_zlib_mode mode> class ZCtx : public ObjectWrap {
// delete the ReqWrap
delete req_wrap;
+ ctx->Unref();
}
static Handle<Value>

0 comments on commit 0ad2717

Please sign in to comment.