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

[BUG] Debug messages are printed to log #852

Closed
1 task done
jbarlowbignell opened this issue Sep 19, 2023 · 2 comments · Fixed by #878
Closed
1 task done

[BUG] Debug messages are printed to log #852

jbarlowbignell opened this issue Sep 19, 2023 · 2 comments · Fixed by #878
Labels

Comments

@jbarlowbignell
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The code has started printing debug messages to via log.Printf(). For example:

2023/09/19 09:27:23 websocket: discarding reader close error: io: read/write on closed pipe

It seems to have been introduced recently:

https://github.com/gorilla/websocket/blame/666c197fc9157896b57515c3a3326c3f8c8319fe/conn.go#L1025

Expected Behavior

No debug messages are printed to the console.

Steps To Reproduce

No response

Anything else?

No response

@jbarlowbignell
Copy link
Author

From the pull request notes, it seems like there were comments saying that writing to the application's stderr is unfriendly. I agree...

#840

@jvegaseg
Copy link

jvegaseg commented Nov 7, 2023

Is there a way to get rid of those log messages?
If it is not possible, how could I check if connection is closed before to call ReadMessage?

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants