Skip to content

Commit

Permalink
Merge pull request #201 from mengskysama/master
Browse files Browse the repository at this point in the history
fix producer Stop() EOF
  • Loading branch information
mreiferson authored Apr 15, 2017
2 parents b9762cd + a7c1e31 commit b2d0b44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,11 @@ func (c *Conn) readLoop() {
}

frameType, data, err := ReadUnpackedResponse(c)

if err != nil {
if err == io.EOF && atomic.LoadInt32(&c.closeFlag) == 1 {
goto exit
}
if !strings.Contains(err.Error(), "use of closed network connection") {
c.log(LogLevelError, "IO error - %s", err)
c.delegate.OnIOError(c, err)
Expand Down

0 comments on commit b2d0b44

Please sign in to comment.