What does Windows error code 536 (ERROR_PIPE_LISTENING) mean?

 
Previous Next
ERROR_PIPE_CONNECTED ERROR_VERIFIER_STOP

ERROR_PIPE_LISTENING

ERROR_PIPE_LISTENING reports that a named-pipe instance is waiting for a client connection. It is returned by ConnectNamedPipe when the handle uses nonblocking wait mode and no client is connected.

Not the same as asynchronous I/O

The legacy PIPE_NOWAIT mode makes certain named-pipe calls return immediately instead of waiting. It does not turn those calls into modern asynchronous operations. Microsoft documents this mode as a compatibility feature and recommends overlapped I/O for background processing.

How to handle it

With a nonblocking-wait pipe, this status means that the server should continue waiting for a client according to its own state machine. For scalable asynchronous code, create the pipe with FILE_FLAG_OVERLAPPED, pass a valid OVERLAPPED structure to ConnectNamedPipe, and handle ERROR_IO_PENDING as the normal in-progress status.

Why the distinction matters

Treating ERROR_PIPE_LISTENING as a completed asynchronous connection can leave the server in the wrong state. Treating it as a fatal failure can cause unnecessary pipe recreation and connection churn.

See Microsoft documentation for named-pipe type, read, and wait modes and ConnectNamedPipe.


Looking for a different code? Search another status or error code.