Commit ac6325e4 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

rpcrt4: Wait for available pipe when connecting to busy server.

It's most likely to happen when server just accepted another connection and didn't create a new listening pipe instance yet. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent dd16a491
...@@ -153,6 +153,10 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname, ...@@ -153,6 +153,10 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname,
if (pipe != INVALID_HANDLE_VALUE) break; if (pipe != INVALID_HANDLE_VALUE) break;
err = GetLastError(); err = GetLastError();
if (err == ERROR_PIPE_BUSY) { if (err == ERROR_PIPE_BUSY) {
if (WaitNamedPipeA(pname, NMPWAIT_USE_DEFAULT_WAIT)) {
TRACE("retrying busy server\n");
continue;
}
TRACE("connection failed, error=%x\n", err); TRACE("connection failed, error=%x\n", err);
return RPC_S_SERVER_TOO_BUSY; return RPC_S_SERVER_TOO_BUSY;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment