Module: wine Branch: master Commit: ac6325e4bbfa6ba9ace5c98787ef770325ddf051 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ac6325e4bbfa6ba9ace5c98787...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Sep 27 20:18:07 2017 +0200
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
---
dlls/rpcrt4/rpc_transport.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 5735b0f..c374ba1 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -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; }