From 505f4290ecb67ee1aa2aa1784ee58b01b162f02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 16 Jul 2013 12:09:10 +0200 Subject: [PATCH] base: activate Rpc_entrypoint explicitly in dtor The Rpc_exit call is delivered via RPC which results in a deadlock if the Rpc_entrypoint has not been started yet. To prevent this situation we active the Rpc_entrypoint explicitly before we call Rpc_exit. Fixes #811. --- base/src/base/server/common.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/src/base/server/common.cc b/base/src/base/server/common.cc index 540dc06d8f..ac92710c49 100644 --- a/base/src/base/server/common.cc +++ b/base/src/base/server/common.cc @@ -120,6 +120,12 @@ Rpc_entrypoint::~Rpc_entrypoint() { typedef Object_pool Pool; + /* + * We have to make sure the server loop is running which is only the case + * if the Rpc_entrypoint was actived before we execute the RPC call. + */ + _delay_start.unlock(); + /* leave server loop */ _exit_cap.call();