Skip to content

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

Description

@vkurland

... 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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions