Skip to content

Conversation

ramlab-jose
Copy link

Under certain conditions, a websocket handler will get stuck in a loop erroring out while attempting to write to a closed websocket. Over time this can lead to resource leakage and eventually leading to an unresponsive rosbridge server.

This PR contains a fix (not sure if the best/right way to achieve it) for this loop code path and thus allowing the resources to be cleaned up properly.

@erikschuitema
Copy link

If I understand correctly, this fix avoids an infinite loop of recursive calls to incoming() in case the buffer contains a partial message.

Copy link

@erikschuitema erikschuitema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me it looks like the goal of the PR can be achieved with less code, in a clearer way.

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

Successfully merging this pull request may close these issues.

2 participants