From b0eaa89a8e63e6c0ea24055d5a3365a70467ed15 Mon Sep 17 00:00:00 2001 From: CMGS Date: Mon, 21 Jul 2014 09:48:38 +0800 Subject: [PATCH] ignore timeout error --- conn.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conn.go b/conn.go index af41beb..a42521d 100644 --- a/conn.go +++ b/conn.go @@ -687,6 +687,9 @@ func (c *Conn) NextReader() (messageType int, r io.Reader, err error) { for c.readErr == nil { frameType, err := c.advanceFrame() if err != nil { + if e, ok := err.(net.Error); ok && e.Timeout() { + continue + } c.readErr = hideTempErr(err) break }