Commit 9b744059 authored by jan.koester's avatar jan.koester
Browse files

test

parent 83ed7da0
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -1150,10 +1150,17 @@ void quic::accept(std::unique_ptr<socket>& csock, bool nonblock) {
    if (recv_len < 0) {
#ifdef Windows
        int err = ::WSAGetLastError();
        if (err == WSAEWOULDBLOCK || err == WSAECONNRESET || err == WSAENETRESET) {
        if (err == WSAEWOULDBLOCK || err == WSAETIMEDOUT
            || err == WSAEMSGSIZE || err == WSAEINTR) {
            csock = nullptr;
            return;
        }
        if (err == WSAECONNRESET || err == WSAENETRESET) {
            continue;  // ICMP noise, retry next datagram
        }
        NetException e;
        e[NetException::Error] << "quic::accept recvfrom failed: WSA error " << err;
        throw e;
#else
        if (errno == EAGAIN || errno == EWOULDBLOCK) {
            csock = nullptr;
@@ -1163,10 +1170,10 @@ void quic::accept(std::unique_ptr<socket>& csock, bool nonblock) {
            csock = nullptr;
            return;
        }
#endif
        NetException e;
        e[NetException::Error] << "quic::accept recvfrom failed";
        e[NetException::Error] << "quic::accept recvfrom failed: errno " << errno;
        throw e;
#endif
    }
    
    if (recv_len < 1) {