diff options
Diffstat (limited to 'pkg/tcpip/sample/tun_tcp_echo')
-rw-r--r-- | pkg/tcpip/sample/tun_tcp_echo/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/sample/tun_tcp_echo/main.go b/pkg/tcpip/sample/tun_tcp_echo/main.go index ae9cf44e7..9b23df3a9 100644 --- a/pkg/tcpip/sample/tun_tcp_echo/main.go +++ b/pkg/tcpip/sample/tun_tcp_echo/main.go @@ -51,7 +51,7 @@ type endpointWriter struct { } type tcpipError struct { - inner *tcpip.Error + inner tcpip.Error } func (e *tcpipError) Error() string { @@ -89,7 +89,7 @@ func echo(wq *waiter.Queue, ep tcpip.Endpoint) { for { _, err := ep.Read(&w, tcpip.ReadOptions{}) if err != nil { - if err == tcpip.ErrWouldBlock { + if _, ok := err.(*tcpip.ErrWouldBlock); ok { <-notifyCh continue } @@ -217,7 +217,7 @@ func main() { for { n, wq, err := ep.Accept(nil) if err != nil { - if err == tcpip.ErrWouldBlock { + if _, ok := err.(*tcpip.ErrWouldBlock); ok { <-notifyCh continue } |