This commit is contained in:
crusader 2017-11-23 17:50:08 +09:00
parent cdcfb562d3
commit 8bc880be32

View File

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