mirror of
https://github.com/sourcegraph/jsonrpc2.git
synced 2026-06-18 13:10:02 +02:00
Use errors.Is/errors.As instead of == comparisons against errors
This commit is contained in:
parent
4756698b1e
commit
95b3fbfc6d
3 changed files with 8 additions and 4 deletions
2
conn.go
2
conn.go
|
|
@ -190,7 +190,7 @@ func (c *Conn) close(cause error) error {
|
|||
close(call.done)
|
||||
}
|
||||
|
||||
if cause != nil && cause != io.EOF && cause != io.ErrUnexpectedEOF {
|
||||
if cause != nil && !errors.Is(cause, io.EOF) && !errors.Is(cause, io.ErrUnexpectedEOF) {
|
||||
c.logger.Printf("jsonrpc2: protocol error: %v\n", cause)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue