Revert "Print log message"

This reverts commit 6db907caed.
This commit is contained in:
Kenjiro Nakayama 2023-12-11 13:39:50 +09:00 committed by Alex Vulaj
parent 7d5b8cce7e
commit cf50a3efbb
1 changed files with 1 additions and 4 deletions

View File

@ -1158,10 +1158,7 @@ func (c *Conn) SetCloseHandler(h func(code int, text string) error) {
if h == nil { if h == nil {
h = func(code int, text string) error { h = func(code int, text string) error {
message := FormatCloseMessage(code, "") message := FormatCloseMessage(code, "")
err := c.WriteControl(CloseMessage, message, time.Now().Add(writeWait)) _ = c.WriteControl(CloseMessage, message, time.Now().Add(writeWait))
if err != nil {
log.Printf("websocket: discarding close handler error: %v", err)
}
return nil return nil
} }
} }