File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -367,8 +367,11 @@ 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 and are "going away" or "no status" errors
370371 _ , message , err := ws .ReadMessage ()
371- if err != nil {
372+ if err != nil && websocket .IsCloseError (err , 1001 , 1005 ) {
373+ break
374+ } else if err != nil {
372375 log .Println ("read:" , err )
373376 break
374377 }
You can’t perform that action at this time.
0 commit comments