diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-24 15:29:16 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-24 15:36:29 +0200 |
commit | 2f2eca894744baef365aaa07554f56979159d988 (patch) | |
tree | 56ecc658ff124222643a13ed9bd75c3a703e726b /conn_linux.go | |
parent | 66f6ca3e4a435935c38b93c4441575e3b003137d (diff) |
Catch EINTR
Diffstat (limited to 'conn_linux.go')
-rw-r--r-- | conn_linux.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/conn_linux.go b/conn_linux.go index 3447f3a..0227f04 100644 --- a/conn_linux.go +++ b/conn_linux.go @@ -18,8 +18,8 @@ package main import ( - "git.zx2c4.com/wireguard-go/rwcancel" "errors" + "git.zx2c4.com/wireguard-go/rwcancel" "golang.org/x/sys/unix" "net" "strconv" @@ -563,7 +563,7 @@ func (bind *NativeBind) routineRouteListener(device *Device) { var msgn int for { msgn, _, _, _, err = unix.Recvmsg(bind.netlinkSock, msg[:], nil, 0) - if err == nil || !rwcancel.ErrorIsEAGAIN(err) { + if err == nil || !rwcancel.RetryAfterError(err) { break } if !bind.netlinkCancel.ReadyRead() { |