void ConnectHandler::disconnectedEventHandlerThreadSafe(std::string imAccountId, bool connectionError, std::string reason, bool fatal) //VOXOX - JRT - 2009.07.13 { if (_userProfile && !_freeze) //VOXOX - JRT - 2009.07.11 - potential crash fix. { IMAccount * imAccount = _userProfile->getIMAccountManager().getIMAccount(imAccountId); if (imAccount) { LOG_INFO( "Disconnect Reason: " + reason + ", " + imAccountId ); imAccount->setConnected(false); //Some reasons indicate we should not automatically retry. //VOXOX - JRT - 2009.07.05 // bool retry = QtEnumIMProtocolMap::shouldRetryConnect( imAccount->getQtProtocol(), reason ); imAccount->setAutoReconnect( !fatal ); _userProfile->updateIMAccount(*imAccount); OWSAFE_DELETE(imAccount); disconnectedEvent(*this, imAccountId, connectionError, reason); } } }