Skip to content

Commit

Permalink
mute EOF error log print on connection close
Browse files Browse the repository at this point in the history
  • Loading branch information
xiemalin committed Apr 27, 2021
1 parent 6434481 commit 1474e4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rpcpackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ func (r *RpcDataPackage) ReadIO(rw io.ReadWriter) error {
head := make([]byte, SIZE)
_, err := rw.Read(head)
if err != nil {
if err == io.EOF {
return ERR_IGNORE_ERR
}
log.Println("Read head error", err)
// only to close current connection
return ERR_IGNORE_ERR
Expand Down

0 comments on commit 1474e4f

Please sign in to comment.