Category : gorilla

I have a routine that tries to detect if a websocket error while reading is an UnexpectedCloseError. This is the code… having a variable: myWebsocket *websocket.Conn my method is: messageType, data, err := myWebsocket.ReadMessage() if err != nil { if websocket.IsUnexpectedCloseError(err) { log.Debugf("WebsocketReadDataMessage: unexpected close error: %v", err) } else { log.Warnf("EXTRANGE!!!!: WebsocketReadDataMessage: error: %v", ..

Read more