| Previous | Next |
| NAP_E_MISMATCHED_ID | NAP_E_ID_NOT_FOUND |
NAP_E_NOT_PENDING
The NAP request is no longer pending when completion is signaled
NAP_E_NOT_PENDING is HRESULT 0x80270009 (signed decimal -2144927735, unsigned decimal 2150039561). winerror.h describes it as “Completion was indicated on a request that is not currently pending.” The value has failure severity, facility 0x27, and code field 0x0009.
Asynchronous ownership has already ended
This result is an asynchronous state-machine guard. An SHV may return E_PENDING from Validate and later call INapServerCallback::OnComplete on a separate thread. Completion is valid only for that pending request and within the lifetime accepted by the NAP server. A duplicate callback, a callback after synchronous completion, or a late callback after timeout can reach a request that is no longer pending.
Invalid completion patterns
- Validate returned S_OK but a worker still called OnComplete for the same request.
- Two worker paths race and both attempt to complete one E_PENDING validation.
- Cancellation or timeout retired the request before backend I/O returned.
- A request pointer was retained beyond its documented lifetime and reused after a new validation began.
- Error handling calls OnComplete once with a SetSoHResponse failure and again from the ordinary success continuation.
Pending-state telemetry
- Assign a validation generation and log the Validate return value, timeout hint, worker start, SetSoHResponse result, and OnComplete timestamp.
- Record which thread won the completion transition and whether cancellation or timeout had already changed the state.
- Preserve the exact request identity without logging health payload contents.
- Track outstanding requests per SHV and flag duplicate terminal transitions in the component before calling NAP.
Repairing asynchronous completion
- Use one atomic transition from pending to completed, cancelled, or expired.
- Call OnComplete only when Validate returned E_PENDING for that same request generation.
- Stop retaining request and callback references once asynchronous completion finishes.
- Make backend callbacks generation-aware so a late result cannot complete a replacement request.
Difference from nearby NAP results
NAP_E_SHV_TIMEOUT describes failure to complete within the permitted interval. NAP_E_NOT_PENDING describes an attempted completion after or without a pending state and can be a consequence of that timeout. NAP_E_MISMATCHED_ID protects request/response correlation at the packet level, not the callback state machine.
Retry and recovery
Do not retry OnComplete on the retired object. Discard the late or duplicate result, release references, and allow a new validation request to establish its own pending lifetime. If timeouts are frequent, fix backend latency or SHV concurrency rather than extending ownership of old request objects.
Practical scenario
An SHV returns E_PENDING and starts two redundant backend probes. The first sets the SoHResponse and completes the request; the second later calls OnComplete and receives NAP_E_NOT_PENDING. Cancelling sibling probes after the first terminal result prevents duplicate completion.
References
Looking for a different code? Search another status or error code.
