MP/Manager: added network poller handling for error and gamelist_diff

This commit is contained in:
Charles Dang 2020-12-28 20:00:48 +11:00
parent d661b68f73
commit d920519027

View File

@ -392,7 +392,11 @@ public:
while(!stop) {
connection->wait_and_receive_data(data);
if(data.has_child("gamelist")) {
if(const config& error = data.child("error")) {
throw wesnothd_error(error["message"]);
}
else if(data.has_child("gamelist")) {
lobby_info.process_gamelist(data);
try {
@ -405,6 +409,10 @@ public:
}
}
}
else if(const config& gamelist_diff = data.child("gamelist_diff")) {
lobby_info.process_gamelist_diff(gamelist_diff);
}
}
});