Loading src/quic.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -135,6 +135,15 @@ quic::quic(const std::map<std::string, ssl::CertificateBundle>& certs, ::setsockopt(_Socket, SOL_SOCKET, SO_SNDBUF, sndopt, sizeof(sndbuf)); #ifdef Windows // Disable SIO_UDP_CONNRESET: on Windows, an ICMP "port unreachable" // response causes the next recvfrom to fail with WSAECONNRESET. BOOL bNewBehavior = FALSE; DWORD dwBytesReturned = 0; ::WSAIoctl(_Socket, SIO_UDP_CONNRESET, &bNewBehavior, sizeof(bNewBehavior), NULL, 0, &dwBytesReturned, NULL, NULL); #endif // Generate local connection ID for server generateConnectionId(_local_cid, 8); } Loading Loading @@ -1141,7 +1150,7 @@ void quic::accept(std::unique_ptr<socket>& csock, bool nonblock) { if (recv_len < 0) { #ifdef Windows int err = ::WSAGetLastError(); if (err == WSAEWOULDBLOCK) { if (err == WSAEWOULDBLOCK || err == WSAECONNRESET || err == WSAENETRESET) { csock = nullptr; return; } Loading Loading
src/quic.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -135,6 +135,15 @@ quic::quic(const std::map<std::string, ssl::CertificateBundle>& certs, ::setsockopt(_Socket, SOL_SOCKET, SO_SNDBUF, sndopt, sizeof(sndbuf)); #ifdef Windows // Disable SIO_UDP_CONNRESET: on Windows, an ICMP "port unreachable" // response causes the next recvfrom to fail with WSAECONNRESET. BOOL bNewBehavior = FALSE; DWORD dwBytesReturned = 0; ::WSAIoctl(_Socket, SIO_UDP_CONNRESET, &bNewBehavior, sizeof(bNewBehavior), NULL, 0, &dwBytesReturned, NULL, NULL); #endif // Generate local connection ID for server generateConnectionId(_local_cid, 8); } Loading Loading @@ -1141,7 +1150,7 @@ void quic::accept(std::unique_ptr<socket>& csock, bool nonblock) { if (recv_len < 0) { #ifdef Windows int err = ::WSAGetLastError(); if (err == WSAEWOULDBLOCK) { if (err == WSAEWOULDBLOCK || err == WSAECONNRESET || err == WSAENETRESET) { csock = nullptr; return; } Loading