Skip to content

Commit

Permalink
Merge pull request #560 from twmb/clean_close_521
Browse files Browse the repository at this point in the history
nsqd: do not print EOF when closing cleanly
  • Loading branch information
mreiferson committed Mar 23, 2015
2 parents 831c218 + 42c88e8 commit 48bb782
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nsqd/protocol_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ func (p *protocolV2) IOLoop(conn net.Conn) error {
// ie. the returned slice is only valid until the next call to it
line, err = client.Reader.ReadSlice('\n')
if err != nil {
err = fmt.Errorf("failed to read command - %s", err)
if atomic.LoadInt32(&client.State) == stateClosing {
err = nil
} else {
err = fmt.Errorf("failed to read command - %s", err)
}
break
}

Expand Down

0 comments on commit 48bb782

Please sign in to comment.