forked from mirrors/0ad
Fix XmppClient upon registration or entering wrong password following 2cccd9825d/D2412.
Differential Revision: https://code.wildfiregames.com/D2482 Tested on: clang 9.0.1, Jenkins/VS2015, Jenkins/gcc6 This was SVN commit r23323.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -279,6 +279,7 @@ void XmppClient::onDisconnect(gloox::ConnectionError error)
|
||||
m_Profile.clear();
|
||||
m_HistoricGuiMessages.clear();
|
||||
m_isConnected = false;
|
||||
m_initialLoadComplete = false;
|
||||
|
||||
CreateGUIMessage(
|
||||
"system",
|
||||
@@ -699,7 +700,7 @@ bool XmppClient::GuiPollHasPlayerListUpdate()
|
||||
|
||||
JS::Value XmppClient::GuiPollNewMessages(const ScriptInterface& scriptInterface)
|
||||
{
|
||||
if (!m_initialLoadComplete || m_GuiMessageQueue.empty())
|
||||
if ((m_isConnected && !m_initialLoadComplete) || m_GuiMessageQueue.empty())
|
||||
return JS::UndefinedValue();
|
||||
|
||||
JSContext* cx = scriptInterface.GetContext();
|
||||
|
||||
Reference in New Issue
Block a user