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: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Jacek Caban 2017-09-27 20:18:07 +02:00 committed by Alexandre Julliard
parent dd16a49144
commit ac6325e4bb
1 changed files with 4 additions and 0 deletions

View File

@ -153,6 +153,10 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname,
if (pipe != INVALID_HANDLE_VALUE) break;
err = GetLastError();
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);
return RPC_S_SERVER_TOO_BUSY;
}