diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 3348efdf..9b2bee00 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -1849,7 +1849,14 @@ static void on_ep3_battle_table_state_updated(shared_ptr l, int16_t table static asio::awaitable on_E4_Ep3(shared_ptr c, Channel::Message& msg) { const auto& cmd = check_size_t(msg.data); - auto l = c->require_lobby(); + + // This command can be received shortly after a proxy session closes if the + // player uses $exit while standing on a battle table pad. In that situation, + // the player will not be in any lobby, so we just ignore the command. + auto l = c->lobby.lock(); + if (!l) { + co_return; + } if (cmd.seat_number >= 4) { throw runtime_error("invalid seat number");