- bugfix for nig's client disconnect error

This commit is contained in:
Mark Vejvoda
2013-01-09 23:34:37 +00:00
parent 31f599aa8f
commit 66bc98c106

View File

@@ -154,6 +154,7 @@ void ClientInterface::update() {
Chrono chrono; Chrono chrono;
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start(); if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
bool wasConncted = this->isConnected();
try { try {
NetworkMessageCommandList networkMessageCommandList(currentFrameCount); NetworkMessageCommandList networkMessageCommandList(currentFrameCount);
@@ -194,9 +195,14 @@ void ClientInterface::update() {
} }
catch(const megaglest_runtime_error &ex) { catch(const megaglest_runtime_error &ex) {
if(this->isConnected() == false) { if(this->isConnected() == false) {
string sErr = string(extractFileFromDirectoryPath(__FILE__).c_str()) + "::" + string(__FUNCTION__) + " network error: " + string(ex.what()); SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
if(wasConncted == false) {
string sErr = string(extractFileFromDirectoryPath(__FILE__).c_str()) + "::" + string(__FUNCTION__) + " network error: " + string(ex.what());
DisplayErrorMessage(sErr);
}
DisplayErrorMessage(sErr);
quit= true; quit= true;
} }
else { else {