* [PATCH] rwcancel: error should be provided by Unix function
@ 2019-07-02 9:12 liuhaichao
0 siblings, 0 replies; only message in thread
From: liuhaichao @ 2019-07-02 9:12 UTC (permalink / raw)
To: wireguard; +Cc: liuhaichao
From: liuhaichao <liuhaichao@bytedance.com>
Change-Id: I7df1f9e0ce43dbe9c415e834757385dad2398707
---
rwcancel/rwcancel.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rwcancel/rwcancel.go b/rwcancel/rwcancel.go
index 62397c2..3abfd0a 100644
--- a/rwcancel/rwcancel.go
+++ b/rwcancel/rwcancel.go
@@ -92,7 +92,7 @@ func (rw *RWCancel) Read(p []byte) (n int, err error) {
return n, err
}
if !rw.ReadyRead() {
- return 0, errors.New("fd closed")
+ continue
}
}
}
@@ -104,7 +104,7 @@ func (rw *RWCancel) Write(p []byte) (n int, err error) {
return n, err
}
if !rw.ReadyWrite() {
- return 0, errors.New("fd closed")
+ continue
}
}
}
--
2.19.1
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-17 20:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 9:12 [PATCH] rwcancel: error should be provided by Unix function liuhaichao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).