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

xhr-polling sessions do not seem to honor timeout and at the same time, have unbounded internal message queue #23

Open
vkurland opened this issue Jul 9, 2020 · 0 comments

Comments

@vkurland
Copy link

vkurland commented Jul 9, 2020

... which can easily lead to a memory-leak-like behavior if the client opens session using xhr-polling but does not actually poll.

I set the timeout in the onConnect() listener:

            socket.on(this);  // attach onDisconnect listener
            socket.getSession().setTimeout(Duration.ofSeconds(30).toMillis());

Please advise if I should set timeout differently. At the very least, the queue com.codeminders.socketio.server.transport.XHRTransportConnection#packets should probably have limited capacity. Maybe even the session could disconnect when the queue becomes full because that means the browser does not read messages

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

1 participant