diff --git a/client/client.go b/client/client.go index 9e2ef53..8be96f8 100644 --- a/client/client.go +++ b/client/client.go @@ -2,6 +2,7 @@ package client import ( "fmt" + "io" "log" "net" "reflect" @@ -298,6 +299,10 @@ func (c *client) rpcReader(readerDone chan<- error) { for { crn, err := c.ch.GetCodec().NewResponseOrNotify(c.conn) if nil != err { + if err == io.ErrUnexpectedEOF || err == io.EOF { + logging.Logger().Info("Client: disconnected from server") + return + } err = fmt.Errorf("Client: Cannot decode response or notify: [%s]", err) logging.Logger().Error(err.Error()) continue