@@ -103,7 +103,7 @@ func (t Websocket) Do(w http.ResponseWriter, r *http.Request, exec graphql.Graph
103103 switch ws .Subprotocol () {
104104 default :
105105 msg := websocket .FormatCloseMessage (websocket .CloseProtocolError , fmt .Sprintf ("unsupported negotiated subprotocol %s" , ws .Subprotocol ()))
106- ws .WriteMessage (websocket .CloseMessage , msg )
106+ _ = ws .WriteMessage (websocket .CloseMessage , msg )
107107 return
108108 case graphqlwsSubprotocol , "" :
109109 // clients are required to send a subprotocol, to be backward compatible with the previous implementation we select
@@ -272,7 +272,7 @@ func (c *wsConnection) run() {
272272 if ! c .MissingPongOk {
273273 // Note: when the connection is closed by this deadline, the client
274274 // will receive an "invalid close code"
275- c .conn .SetReadDeadline (time .Now ().UTC ().Add (2 * c .PingPongInterval ))
275+ _ = c .conn .SetReadDeadline (time .Now ().UTC ().Add (2 * c .PingPongInterval ))
276276 }
277277 go c .ping (ctx )
278278 }
@@ -312,7 +312,7 @@ func (c *wsConnection) run() {
312312 c .receivedPong = true
313313 c .mu .Unlock ()
314314 // Clear ReadTimeout -- 0 time val clears.
315- c .conn .SetReadDeadline (time.Time {})
315+ _ = c .conn .SetReadDeadline (time.Time {})
316316 default :
317317 c .sendConnectionError ("unexpected message %s" , m .t )
318318 c .close (websocket .CloseProtocolError , "unexpected message" )
@@ -357,7 +357,7 @@ func (c *wsConnection) ping(ctx context.Context) {
357357 // if we have not yet received a pong, don't reset the deadline.
358358 c .mu .Lock ()
359359 if ! c .MissingPongOk && c .receivedPong {
360- c .conn .SetReadDeadline (time .Now ().UTC ().Add (2 * c .PingPongInterval ))
360+ _ = c .conn .SetReadDeadline (time .Now ().UTC ().Add (2 * c .PingPongInterval ))
361361 }
362362 c .receivedPong = false
363363 c .mu .Unlock ()
0 commit comments