Use CancelIoEx Instead
@@ -2388,7 +2388,11 @@ CxPlatSocketDelete(
QUIC_DISABLED_BY_FUZZER_START;
+ if (Socket->Type == CXPLAT_SOCKET_UDP) {
+ CancelIoEx((HANDLE)SocketProc->Socket, NULL);
+ } else {
CancelIo((HANDLE)SocketProc->Socket);
+ }
if (closesocket(SocketProc->Socket) == SOCKET_ERROR) {
int WsaError = WSAGetLastError();
QuicTraceEvent(
@@ -2420,7 +2424,11 @@ QUIC_DISABLED_BY_FUZZER_END;
QUIC_DISABLED_BY_FUZZER_START;
+ if (Socket->Type == CXPLAT_SOCKET_UDP) {
+ CancelIoEx((HANDLE)SocketProc->Socket, NULL);
+ } else {
CancelIo((HANDLE)SocketProc->Socket);
+ }
closesocket(SocketProc->Socket);
QUIC_DISABLED_BY_FUZZER_END;
