Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Wait for websockets to close on server stop#1171

Open
DavidPetkovsek wants to merge 3 commits into
CrowCpp:masterCrowCpp/Crow:masterfrom
DavidPetkovsek:bug/close-websockets-on-stopDavidPetkovsek/Crow:bug/close-websockets-on-stopCopy head branch name to clipboard
Open

Wait for websockets to close on server stop#1171
DavidPetkovsek wants to merge 3 commits into
CrowCpp:masterCrowCpp/Crow:masterfrom
DavidPetkovsek:bug/close-websockets-on-stopDavidPetkovsek/Crow:bug/close-websockets-on-stopCopy head branch name to clipboard

Conversation

@DavidPetkovsek

Copy link
Copy Markdown
Contributor

The bug is a race between close_websockets() in app.h and stopping the io_context/io_service objects that would actually send the close frame.

This change makes it so then the close frame for this function uses an alternative call that contains a promise that is used to avoid a race.

If it takes too long (5 seconds) it will proceed anyway and no close frame will be provided and a crow log is added.

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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.