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

processing.net.Server only cleans up internal Clients when trying to write #3089

Closed
kfeuz opened this Issue Feb 5, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@kfeuz
Contributor

kfeuz commented Feb 5, 2015

This can lead to memory issues if the server only reads data and never/seldom attempts to write to the clients. I see a few ways to attempt to resolve this. We could check for dead clients in the available() method or the run() loop. The other approach would be to add some sort of callback to the Server when the internal client dies. Is there a preference for one technique over the other? I would be happy to submit a PR once this is decided.

@gohai

This comment has been minimized.

Show comment
Hide comment
@gohai

gohai Feb 6, 2015

Contributor

My first time looking really at the network code, but I see the issue you describe.. I'd suggest adding the check to available(), since this should work for all practical cases, and we're already iterating over the array there.

Contributor

gohai commented Feb 6, 2015

My first time looking really at the network code, but I see the issue you describe.. I'd suggest adding the check to available(), since this should work for all practical cases, and we're already iterating over the array there.

@kfeuz

This comment has been minimized.

Show comment
Hide comment
@kfeuz

kfeuz Feb 6, 2015

Contributor

In looking at the issue a little closer, checking for dead clients in available does seem like the best choice. It allows us to have a chance to retrieve the unread data from dead clients before they get discarded. I have submitted a pull request.

Contributor

kfeuz commented Feb 6, 2015

In looking at the issue a little closer, checking for dead clients in available does seem like the best choice. It allows us to have a chance to retrieve the unread data from dead clients before they get discarded. I have submitted a pull request.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Feb 21, 2015

Member

Fix incorporated for 3.0a6.

Member

benfry commented Feb 21, 2015

Fix incorporated for 3.0a6.

@benfry benfry closed this Feb 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment