Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context preservation fails for zlib.unzip #22

Open
rf opened this issue Dec 22, 2014 · 6 comments
Open

Context preservation fails for zlib.unzip #22

rf opened this issue Dec 22, 2014 · 6 comments

Comments

@rf
Copy link

rf commented Dec 22, 2014

Here's a failing test on my fork. It seems to work in the case of zlib.gzip but when I try to use unzip my global variable doesn't get preserved. If you replace the call to zlib.unzip with a process.nextTick, it'll work.

Am I misunderstanding the use of this, or is this a bug in the way zlib is wrapped?

@sh1mmer @Raynos @othiym23

@Raynos
Copy link

Raynos commented Dec 22, 2014

cc @creationix

@Raynos
Copy link

Raynos commented Dec 22, 2014

@rf which version of node ?

Looking at the source code I dont see anything different between gzip & unzip in node.

@rf
Copy link
Author

rf commented Dec 22, 2014

I was running the test with v0.10.26. I just tried with node v0.10.34 and I'm still seeing my test fail. I looked at the source as well and figured the same thing, so I'm not sure what's going on here.

@Raynos
Copy link

Raynos commented Dec 22, 2014

@rf try running the tests in different orders, it might not be gzip vs unzip, it might be the first one wins & second one fails.

@rf
Copy link
Author

rf commented Dec 22, 2014

Tried that too. The unzip test will consistently fail, even if they are run separately or the unzip test is run first.

And the gzip test consistently succeeds. Tried with v0.10.26 and v0.10.34.

@othiym23
Copy link
Owner

I'll take a look. It's possible there's something wacky with native bindings going on under the hood and the default wrapping method won't work for zlib. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants