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

Code on npmjs.org is not synced with that on github.com, which will leads to memory leak. #57

Closed
crystaldust opened this issue Mar 26, 2015 · 4 comments

Comments

@crystaldust
Copy link

Hi, there,
I recently found that zerorpc.Server instance will cause memory leak, after digged it a little, I found that the code in npmjs.org and github.com is no synced. In the file:
lib/channel.js

At line 151, code on github:

151    if(this._state == CHANNEL_CLOSING && this._outBuffer.length() == 0) {

the code is correct, while at line 150, code on npmjs, the code is:

150    if(this.state == CHANNEL_CLOSING && this._outBuffer.length() == 0) {

The judgement refers to this.state, which is always undefined. So the condition will always be false, the code within the block(which delete the used channels) will never be done, thus leading to the memory leak.

@crystaldust crystaldust changed the title Code not synced with npm, which will lead to memory leak. Code not synced with npm, which will leads to memory leak. Mar 26, 2015
@crystaldust
Copy link
Author

I've found a zerorpc-fork on npmjs.org, which did the right thing:

https://www.npmjs.com/package/zerorpc-fork

@crystaldust crystaldust changed the title Code not synced with npm, which will leads to memory leak. Code on npmjs.org is not synced with that on github.com, which will leads to memory leak. Mar 26, 2015
@bombela
Copy link
Member

bombela commented Jun 5, 2015

Thanks for the report, I will release a new version soon.

@bombela
Copy link
Member

bombela commented Jun 5, 2015

done, new version released on npm 0.9.5.

@bombela bombela closed this as completed Jun 5, 2015
@crystaldust
Copy link
Author

Thanks bolmbela, happy to see the project is alive again!

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

2 participants