Skip to content

Fix stack overflow crash#810

Merged
JacksonTian merged 2 commits intowebsockets:masterfrom
timjrobinson:fix-flush-stack-overflow
Sep 22, 2016
Merged

Fix stack overflow crash#810
JacksonTian merged 2 commits intowebsockets:masterfrom
timjrobinson:fix-flush-stack-overflow

Conversation

@timjrobinson
Copy link
Copy Markdown
Contributor

If a message has many messageHandlers it can trigger a stack overflow as it recursively calls flush on each one. This ensures that the stack is cleared before each recursive flush is called.

Fixes #809

@JacksonTian
Copy link
Copy Markdown
Contributor

Could you provide a test case?

@timjrobinson
Copy link
Copy Markdown
Contributor Author

@JacksonTian done. I found the issue happens when you send too many messages while one is still processing.

@3rd-Eden
Copy link
Copy Markdown
Member

LGTM.

@JacksonTian JacksonTian merged commit 9475ebb into websockets:master Sep 22, 2016
@zertosh
Copy link
Copy Markdown

zertosh commented Nov 18, 2016

@JacksonTian any way you can publish a patch release with this fix? I'd very much appreciate it.

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.

4 participants