mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 15:24:09 +00:00
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>
This commit is contained in:
parent
dd16a49144
commit
ac6325e4bb
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue