Skip to content

Commit

Permalink
kill noisy ws error logs (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashukur authored Aug 6, 2024
1 parent 5f877de commit 4b8604f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions graphql/transport/graphqltransportws/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ func (c *Connection) writeLoop() {
return
case <-c.closeReceived:
// the client initiated the close handshake
if err := c.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "close requested by client")); err != nil {
c.Handler.LogError(errors.Wrap(err, "websocket control write error"))
}
c.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "close requested by client"))
return
}

Expand Down
4 changes: 1 addition & 3 deletions graphql/transport/graphqlws/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ func (c *Connection) writeLoop() {
return
case <-c.closeReceived:
// the client initiated the close handshake
if err := c.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "close requested by client")); err != nil {
c.Handler.LogError(errors.Wrap(err, "websocket control write error"))
}
c.conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "close requested by client"))
return
}

Expand Down

0 comments on commit 4b8604f

Please sign in to comment.