Skip to content

Commit

Permalink
Merge pull request #22 from cyshi/master
Browse files Browse the repository at this point in the history
fix RpcListener's _is_closed status to proper value
  • Loading branch information
qinzuoyan committed May 12, 2015
2 parents faeca98 + 342d7c0 commit 79efbfc
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 79efbfc

Please sign in to comment.