Skip to content

Commit

Permalink
modify RpcListener status to closed when it created
Browse files Browse the repository at this point in the history
  • Loading branch information
cyshi committed May 12, 2015
1 parent faeca98 commit 342d7c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sofa/pbrpc/rpc_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class RpcListener : public sofa::pbrpc::enable_shared_from_this<RpcListener>
, _endpoint(endpoint)
, _endpoint_str(RpcEndpointToString(endpoint))
, _acceptor(io_service)
, _is_closed(false)
, _is_closed(true)
{
SOFA_PBRPC_INC_RESOURCE_COUNTER(RpcListener);
}
Expand Down Expand Up @@ -152,6 +152,7 @@ class RpcListener : public sofa::pbrpc::enable_shared_from_this<RpcListener>
#else
SLOG(INFO, "start_listen(): listen succeed: %s", _endpoint_str.c_str());
#endif
_is_closed = false;

async_accept();

Expand Down

0 comments on commit 342d7c0

Please sign in to comment.