Skip to content

Commit

Permalink
read stop channel
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn authored and emidev98 committed Oct 6, 2023
1 parent 977d31c commit 77a834e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (s *Server) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
removeListener(ws)
}
s.clientsMu.Unlock()
s.Log.Infof("diconnected from %s", conn.RemoteAddr().String())
s.Log.Infof("disconnected from %s", conn.RemoteAddr().String())
}()

conn.SetReadLimit(maxMessageSize)
Expand Down Expand Up @@ -379,6 +379,8 @@ func (s *Server) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
defer func() {
ticker.Stop()
conn.Close()
for := range stop {
}
}()

for {
Expand Down

0 comments on commit 77a834e

Please sign in to comment.