File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,9 +367,9 @@ func (s *LocalGatewayService) handleWebsocketRequest(socketName string) func(ctx
367367 // Need to create a unique ID for this connection and store in a central location
368368 // This will allow connected clients to message eachother and broadcast to all clients as well
369369 // We'll only read new messages on this connection here, writing will be done by a separate runtime API
370- // Won't print errors that arise if the socket is closed, i.e. "websocket: close 1005 ( no status)"
370+ // Won't print errors that arise if the socket is closed and are "going away" or " no status" errors
371371 _ , message , err := ws .ReadMessage ()
372- if err != nil && strings . Contains (err . Error (), "no status" ) {
372+ if err != nil && websocket . IsCloseError (err , 1001 , 1005 ) {
373373 break
374374 } else if err != nil {
375375 log .Println ("read:" , err )
You can’t perform that action at this time.
0 commit comments