forked from cerc-io/plugeth
p2p: use errors.Is for error comparison (#24882)
Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
co-authored by
Felix Lange
parent
41e75480df
commit
138f0d7494
+1
-1
@@ -103,7 +103,7 @@ func discReasonForError(err error) DiscReason {
|
||||
if reason, ok := err.(DiscReason); ok {
|
||||
return reason
|
||||
}
|
||||
if err == errProtocolReturned {
|
||||
if errors.Is(err, errProtocolReturned) {
|
||||
return DiscQuitting
|
||||
}
|
||||
peerError, ok := err.(*peerError)
|
||||
|
||||
Reference in New Issue
Block a user