Skip to content

Commit

Permalink
Remove duplicate s.Close, the defer method calls it
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgarnett committed Nov 21, 2023
1 parent eb2aafd commit 231f258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/session_ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func (s *sessionWS) processOutgoing() {
// Update read deadline, since we aren't sending a ping, which means the pong handler won't be triggered
if err := s.conn.SetReadDeadline(time.Now().Add(s.pongWaitDuration)); err != nil {
s.logger.Warn("Failed to set read deadline", zap.Error(err))
s.Close("failed to set read deadline", runtime.PresenceReasonDisconnect)
reason = err.Error()
return
}

Expand Down

0 comments on commit 231f258

Please sign in to comment.