Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data
@ 2021-04-24 13:33 Sascha Dierberg
  2021-04-27  2:09 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha Dierberg @ 2021-04-24 13:33 UTC (permalink / raw)
  To: wireguard

From: Sascha Dierberg <dierberg@dresearch-fe.de>

Signed-off-by: Sascha Dierberg <dierberg@dresearch-fe.de>
---
 conn/bind_windows.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/conn/bind_windows.go b/conn/bind_windows.go
index fdd1c24..e78bef9 100644
--- a/conn/bind_windows.go
+++ b/conn/bind_windows.go
@@ -389,6 +389,10 @@ func (bind *afWinRingBind) Receive(buf []byte,
isOpen *uint32) (int, Endpoint, e
  if err != nil {
  return 0, nil, err
  }
+ // WSAEMSGSIZE message too long error on Winsock2
+ if results[0].Status == 10040 {
+ return 0, nil, nil
+ }
  if results[0].Status != 0 {
  return 0, nil, windows.Errno(results[0].Status)
  }
-- 
2.31.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-11 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-24 13:33 [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data Sascha Dierberg
2021-04-27  2:09 ` Jason A. Donenfeld
2021-05-11 13:29   ` Sascha Dierberg
2021-05-11 14:49     ` Jason A. Donenfeld

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).