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

messageChannels map memory leak with REGISTER over websocket connections #3

Closed
deruelle opened this issue Jul 18, 2015 · 0 comments
Closed
Assignees
Labels

Comments

@deruelle
Copy link
Member

In NioWebSocketMessageChannel.processMessage() there's a call to NioTcpMessageProcessor.assignChannelToDestination() which ultimately adds an entry to ConnectionOrientedMessageProcessor.messageChannels with a key from the Contact header of the REGISTER request.

But this key never seems to be removed because the Channel's .getKey() returns a different key, and as far as I can tell the map is only cleaned up by removing the keys that the channels specify. The contact hostname is just some '.invalid' hostname so a key of, e.g. "wss:s03k4bate5k0.invalid:5060" is inserted into the map, but the channel's .getKey() returns "wss:127.0.0.1:40144".

And I believe an entry with the key "wss:127.0.0.1:40144" is inserted into the map by NioWebSocketMessageProcessor.CreateChannel() which is cleaned up because it matches the Channel's own idea of what its key is.

There should be no need for the stack to keep the mapping of Contact to socket connections as this should be done at the application level using RFC 5626 as described in RFC7118

@deruelle deruelle added the bug label Jul 18, 2015
@deruelle deruelle self-assigned this Jul 18, 2015
deruelle pushed a commit that referenced this issue Jul 18, 2015
JSIP-504

Removing code that lead to the mem leak on WebSocket Channel with REGISTER. Contribution from Michael Groshans
deruelle pushed a commit that referenced this issue Nov 3, 2015
JSIP-504

Removing code that lead to the mem leak on WebSocket Channel with REGISTER. Contribution from Michael Groshans

git-svn-id: https://svn.java.net/svn/jsip~svn/trunk@2380 8e71dc83-d81e-6649-80f2-80b843a9b2be
deruelle referenced this issue in mobius-software-ltd/corsac-sip Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant