mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-05-07 06:23:39 +08:00
15 lines
317 B
Go
15 lines
317 B
Go
package kernel
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"net"
|
|
)
|
|
|
|
// IsUnknownServerListenError checks if the error is an unknown server listen error
|
|
func IsUnknownServerListenError(err error) bool {
|
|
return !errors.Is(err, context.DeadlineExceeded) &&
|
|
!errors.Is(err, context.Canceled) &&
|
|
!errors.Is(err, net.ErrClosed)
|
|
}
|