QQAccount account = getContext().getAccount();
session.setState(QQSession.State.OFFLINE);
account.setStatus(QQStatus.OFFLINE);
//因为自带了错误重试机制,如果出现了错误回调,表明已经超时多次均失败,这里直接返回网络错误的异常
QQException ex = (QQException) event.getTarget();
QQErrorCode code = ex.getError();
if(code == QQErrorCode.INVALID_LOGIN_AUTH) {
relogin();
} else if(code == QQErrorCode.IO_ERROR || code == QQErrorCode.IO_TIMEOUT){
//粗线了IO异常,直接报网络错误
getContext().fireNotify(new QQNotifyEvent(QQNotifyEvent.Type.NET_ERROR, ex));