From 342d7c074175af04123e78738e3af9de254765e3 Mon Sep 17 00:00:00 2001 From: cyshi Date: Tue, 12 May 2015 20:14:56 +0800 Subject: [PATCH] modify RpcListener status to closed when it created --- src/sofa/pbrpc/rpc_listener.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sofa/pbrpc/rpc_listener.h b/src/sofa/pbrpc/rpc_listener.h index ac0f0e8..5dcab57 100644 --- a/src/sofa/pbrpc/rpc_listener.h +++ b/src/sofa/pbrpc/rpc_listener.h @@ -33,7 +33,7 @@ class RpcListener : public sofa::pbrpc::enable_shared_from_this , _endpoint(endpoint) , _endpoint_str(RpcEndpointToString(endpoint)) , _acceptor(io_service) - , _is_closed(false) + , _is_closed(true) { SOFA_PBRPC_INC_RESOURCE_COUNTER(RpcListener); } @@ -152,6 +152,7 @@ class RpcListener : public sofa::pbrpc::enable_shared_from_this #else SLOG(INFO, "start_listen(): listen succeed: %s", _endpoint_str.c_str()); #endif + _is_closed = false; async_accept();