Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
kbengine committed Aug 4, 2014
1 parent d8ba0af commit ce6351b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions kbe/src/server/tools/bots/clientobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ bool ClientObject::initCreate()
pEndpoint->convertAddress(infos.login_ip, address);
if(pEndpoint->connect(htons(infos.login_port), address) == -1)
{
ERROR_MSG(boost::format("ClientObject::initNetwork: connect server is error(%1%)!\n") %
kbe_strerror());
ERROR_MSG(boost::format("ClientObject::initNetwork(%2%): connect server is error(%1%)!\n") %
kbe_strerror() % name_);

delete pEndpoint;
// error_ = C_ERROR_INIT_NETWORK_FAILED;
state_ = C_STATE_INIT;
return false;
}

Expand Down Expand Up @@ -197,11 +198,12 @@ bool ClientObject::initLoginGateWay()
pEndpoint->convertAddress(ip_.c_str(), address);
if(pEndpoint->connect(htons(port_), address) == -1)
{
ERROR_MSG(boost::format("ClientObject::initLogin: connect server is error(%1%)!\n") %
kbe_strerror());
ERROR_MSG(boost::format("ClientObject::initLogin(%2%): connect server is error(%1%)!\n") %
kbe_strerror() % name_);

delete pEndpoint;
// error_ = C_ERROR_INIT_NETWORK_FAILED;
state_ = C_STATE_LOGIN_GATEWAY_CREATE;
return false;
}

Expand Down

0 comments on commit ce6351b

Please sign in to comment.