add checks for disabled proxy server; fixes #580

This commit is contained in:
Martin Michelsen
2024-10-29 06:32:12 -07:00
parent 996509531c
commit 6e808b8340
4 changed files with 43 additions and 27 deletions
+5
View File
@@ -234,6 +234,11 @@ void send_client_to_lobby_server(shared_ptr<Client> c) {
}
void send_client_to_proxy_server(shared_ptr<Client> c) {
auto s = c->require_server_state();
if (!s->proxy_server) {
throw logic_error("send_client_to_proxy_server called without proxy server present");
}
send_first_pre_lobby_commands(c, [wc = weak_ptr(c)]() {
auto c = wc.lock();
if (!c) {