The new IOCP provider associates a socket with _port on its first operation. iocp_shutdown drains outstanding work, closes the port handle and clears _port. A later operation creates a different port and attempts to associate the still-open socket with it. Windows retains the original completion-port association until the socket handle is closed.
The public task comments require completing/cancelling work before shutdown, but do not require closing all otherwise-live application sockets. Reusing such a socket in a subsequent block_on therefore reaches a native association failure.
Source evidence at the head of #520:
Acceptance:
API/reference context: CreateIoCompletionPort handle association lifetime.
Related: #444 and #445.
Audit status: identified by static source inspection; the scenarios above have not been executed during this audit. This follows up the implementation introduced in draft PR #520.
The new IOCP provider associates a socket with
_porton its first operation.iocp_shutdowndrains outstanding work, closes the port handle and clears_port. A later operation creates a different port and attempts to associate the still-open socket with it. Windows retains the original completion-port association until the socket handle is closed.The public task comments require completing/cancelling work before shutdown, but do not require closing all otherwise-live application sockets. Reusing such a socket in a subsequent block_on therefore reaches a native association failure.
Source evidence at the head of #520:
pub fun iocp_start_iopub fun iocp_shutdown// Complete or cancelAcceptance:
API/reference context: CreateIoCompletionPort handle association lifetime.
Related: #444 and #445.
Audit status: identified by static source inspection; the scenarios above have not been executed during this audit. This follows up the implementation introduced in draft PR #520.