mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-22 05:46:30 +03:00
Don't indefinitely block TUN/TAP reader goroutine when a conn error happens
This commit is contained in:
@@ -207,7 +207,7 @@ func (c *Conn) Read(b []byte) (int, error) {
|
||||
defer close(done)
|
||||
// If the nonce is bad then drop the packet and return an error
|
||||
if !sinfo.nonceIsOK(&p.Nonce) {
|
||||
err = errors.New("packet dropped due to invalid nonce")
|
||||
err = ConnError{errors.New("packet dropped due to invalid nonce"), false, true, 0}
|
||||
return
|
||||
}
|
||||
// Decrypt the packet
|
||||
|
||||
Reference in New Issue
Block a user