mirror of
https://github.com/netbirdio/netbird.git
synced 2025-07-11 20:05:19 +02:00
Fix error type in QUIC listener
This commit is contained in:
@ -91,7 +91,7 @@ func (c *Conn) isClosed() bool {
|
|||||||
|
|
||||||
func (c *Conn) ioErrHandling(err error) error {
|
func (c *Conn) ioErrHandling(err error) error {
|
||||||
if c.isClosed() {
|
if c.isClosed() {
|
||||||
return io.EOF
|
return net.ErrClosed
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle QUIC-specific errors
|
// Handle QUIC-specific errors
|
||||||
@ -102,7 +102,7 @@ func (c *Conn) ioErrHandling(err error) error {
|
|||||||
// Check if the connection was closed remotely
|
// Check if the connection was closed remotely
|
||||||
var appErr *quic.ApplicationError
|
var appErr *quic.ApplicationError
|
||||||
if errors.As(err, &appErr) && appErr.ErrorCode == 0 { // 0 is normal closure
|
if errors.As(err, &appErr) && appErr.ErrorCode == 0 { // 0 is normal closure
|
||||||
return io.EOF
|
return net.ErrClosed
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
Reference in New Issue
Block a user