wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: Sascha Dierberg <sascha.dierberg@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data
Date: Sat, 24 Apr 2021 15:33:32 +0200	[thread overview]
Message-ID: <CAGYZcps=qdWvwsed+kRY90W-7d9N09tiACRFj9yMy6OMXe9znQ@mail.gmail.com> (raw)

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

             reply	other threads:[~2021-04-27  1:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24 13:33 Sascha Dierberg [this message]
2021-04-27  2:09 ` [PATCH] Windows Bindings: handler for WSAEMSGSIZE added to avoid stop receiving data Jason A. Donenfeld
2021-05-11 13:29   ` Sascha Dierberg
2021-05-11 14:49     ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGYZcps=qdWvwsed+kRY90W-7d9N09tiACRFj9yMy6OMXe9znQ@mail.gmail.com' \
    --to=sascha.dierberg@gmail.com \
    --cc=sascha@dierberg.de \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).