mirror of https://github.com/gorilla/websocket.git
ignore timeout error
This commit is contained in:
parent
10afcadf69
commit
b0eaa89a8e
3
conn.go
3
conn.go
|
@ -687,6 +687,9 @@ func (c *Conn) NextReader() (messageType int, r io.Reader, err error) {
|
||||||
for c.readErr == nil {
|
for c.readErr == nil {
|
||||||
frameType, err := c.advanceFrame()
|
frameType, err := c.advanceFrame()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if e, ok := err.(net.Error); ok && e.Timeout() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
c.readErr = hideTempErr(err)
|
c.readErr = hideTempErr(err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue