Closing handshake for unidirectional websocket #1071
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates #1069
Unidirectional WebSocket now uses closing handshake for server-initiated disconnects.
Two new options for
uni_websocketsection:disable_closing_handshakedisables WebSocket closing handshake. This restores the behavior prior to Centrifugo v6.5.1 where server never sent a close frame on connection close initiated by server. Normally closing handshake is recommended to be performed according to WebSocket protocol RFC, so this option is useful only in some specific cases when you need to restore the previous behavior.disable_disconnect_pushdisables sending disconnect push messages to clients. It's sent by default to make unidirectional transports similar, but since uni_websocket transport also sends close frame to the client with the same code/reason – some users may want to disable disconnect push to avoid ambiguity.