ignore timeout error

This commit is contained in:
CMGS 2014-07-21 09:48:38 +08:00
parent 10afcadf69
commit b0eaa89a8e
1 changed files with 3 additions and 0 deletions

View File

@ -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
}