From ff4ba9573cba848e4725a4acdbcd506022f51b4e Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Wed, 8 Jun 2005 18:32:30 +0000 Subject: [PATCH] Fix an RPC server startup race introduced by me. --- dlls/rpcrt4/rpc_server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 922d1c7bdd4..5f548f5cb4e 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -846,8 +846,11 @@ RPC_STATUS WINAPI RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, LeaveCriticalSection(&server_cs); if (sif->Flags & RPC_IF_AUTOLISTEN) { - /* well, start listening, I think... */ RPCRT4_start_listen(TRUE); + + /* make sure server is actually listening on the interface before + * returning */ + RPCRT4_sync_with_server_thread(); } return RPC_S_OK;