Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't send close in response to close. Fixes #443 #444

Merged
merged 1 commit into from Oct 31, 2023
Merged

Conversation

plorenz
Copy link
Member

@plorenz plorenz commented Oct 31, 2023

No description provided.

@plorenz plorenz requested a review from a team as a code owner October 31, 2023 15:10
@plorenz plorenz merged commit 195164f into main Oct 31, 2023
8 checks passed
@plorenz plorenz deleted the dont-double-close branch October 31, 2023 18:52
@@ -146,10 +150,7 @@ func (listener *edgeListener) Close() error {
edgeChan.hosting.Delete(listener.token)

defer func() {
if err := edgeChan.Close(); err != nil {
logger.WithError(err).Error("unable to close conn")
Copy link
Member

Choose a reason for hiding this comment

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

this isn't possible to fail? i don't see why not log it. was it super chatty?

Copy link
Member Author

Choose a reason for hiding this comment

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

Close() returns an error to conform to the io.Closer interface. However close(bool) doesn't since it doesn't need to conform to the interface, (and Close() always returned nil because it just called close()).

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.

None yet

3 participants