Browse Source

rpc: fix client websocket timeout (#687)

pull/694/merge
Alexandre Thibault 7 years ago
committed by Anton Kaliaev
parent
commit
382bead548
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      rpc/lib/server/handlers.go

+ 4
- 0
rpc/lib/server/handlers.go View File

@ -488,6 +488,10 @@ func (wsc *wsConnection) readRoutine() {
wsc.baseConn.Close()
}()
wsc.baseConn.SetPongHandler(func(m string) error {
return wsc.baseConn.SetReadDeadline(time.Now().Add(wsc.readWait))
})
for {
select {
case <-wsc.Quit:


Loading…
Cancel
Save