fix: treat a replied close frame like a :close result - #102
Merged
Merged
Conversation
A close frame returned as `{:reply, frame, state}` went through `handle_send/1`, so a close that could not be sent was logged through `handle_error/2` while the same intent spelled `{:close, code, reason, state}` went through `handle_close/1`: ignored when there is nothing to close, and a disconnect when the write itself failed.
Both spellings now take the same path.
The server answered the close and the client stopped before the later assertions ran, so the call exited instead of returning {:error, :closing}. It only opened on a loaded runner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A close frame returned as
{:reply, frame, state}went throughhandle_send/1, so a close that could not be sent was logged throughhandle_error/2while the same intent spelled{:close, code, reason, state}went throughhandle_close/1: ignored when there is nothing to close, and a disconnect when the write itself failed.Both spellings now take the same path.