UPD: Send Connection Success only when auth acc was received
This commit is contained in:
parent
d58b84d4a5
commit
6c2f580134
@ -27,8 +27,6 @@ protected:
|
||||
{"token", getConfig().token}
|
||||
}}
|
||||
});
|
||||
NetworkEvents connectResult = ConnectResult(true, "");
|
||||
m_networkEventBus->publish(connectResult);
|
||||
}
|
||||
|
||||
void onDisconnected() override {
|
||||
@ -36,6 +34,10 @@ protected:
|
||||
}
|
||||
|
||||
void onMessage(nlohmann::json message) override {
|
||||
if (message.value("type", "") == "auth_ack") {
|
||||
NetworkEvents connectResult = ConnectResult(true, "");
|
||||
m_networkEventBus->publish(connectResult);
|
||||
}
|
||||
std::cout << "Empfangen: " << message.dump() << "\n";
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user