diff --git a/Driver.cpp b/Driver.cpp index e76473c..cf61a1a 100644 --- a/Driver.cpp +++ b/Driver.cpp @@ -231,9 +231,6 @@ OvpnEvtIoDeviceControl(WDFQUEUE queue, WDFREQUEST request, size_t outputBufferLe case OVPN_IOCTL_NEW_PEER: status = OvpnPeerNew(device, request); - if (status == STATUS_PENDING) { - LOG_IF_NOT_NT_SUCCESS(WdfRequestForwardToIoQueue(request, device->PendingNewPeerQueue)); - } break; case OVPN_IOCTL_START_VPN: diff --git a/peer.cpp b/peer.cpp index d6af12c..d156b34 100644 --- a/peer.cpp +++ b/peer.cpp @@ -87,6 +87,7 @@ OvpnPeerNew(POVPN_DEVICE device, WDFREQUEST request) OvpnPeerZeroStats(&device->Stats); if (proto_tcp) { + LOG_IF_NOT_NT_SUCCESS(status = WdfRequestForwardToIoQueue(request, device->PendingNewPeerQueue)); // start async connect status = OvpnSocketTcpConnect(socket, device, (PSOCKADDR)&peer->Remote); }