Fix error usages
This commit is contained in:
parent
bea26198e7
commit
2121bc3f01
4 changed files with 10 additions and 6 deletions
|
|
@ -4,6 +4,7 @@ package tun
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"net"
|
||||
"os"
|
||||
"sync"
|
||||
|
|
@ -79,7 +80,7 @@ func (c *gLazyConn) HandshakeFailure(err error) error {
|
|||
if c.handshakeDone {
|
||||
return os.ErrInvalid
|
||||
}
|
||||
c.request.Complete(err != ErrDrop)
|
||||
c.request.Complete(!errors.Is(err, ErrDrop))
|
||||
c.handshakeDone = true
|
||||
c.handshakeErr = err
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue