fix timeout
This commit is contained in:
4
main.go
4
main.go
@@ -330,9 +330,9 @@ func (s *nowPlayingServer) setLast(message string) {
|
||||
func (s *nowPlayingServer) readUntilClose(conn *websocket.Conn) {
|
||||
defer s.removeClient(conn)
|
||||
conn.SetReadLimit(1024)
|
||||
conn.SetReadDeadline(time.Now().Add(60 * time.Second))
|
||||
conn.SetReadDeadline(time.Now().Add(3600 * time.Second))
|
||||
conn.SetPongHandler(func(string) error {
|
||||
conn.SetReadDeadline(time.Now().Add(60 * time.Second))
|
||||
conn.SetReadDeadline(time.Now().Add(3600 * time.Second))
|
||||
return nil
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user