Chat says it's only available in a lobby while you're in one (late leave answer tears down the new lobby)

未关闭
#47 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Jr-JoshS 已经在做这个了。

开始于 2026年10月31日。

  • #48 来自 @Jr-JoshS —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
lua
领域
api, networking

调研方向

The bug is in the teardown run by lobby:leave() when the lobby_leave RPC callback arrives late. Start with the callback and the cleanup functions it calls: L.cleanup, MPAPI.chat.cleanup(), nakama_lobby.forget() and on_lobby_disconnected(). Done means a late leave answer no longer affects a lobby the player has since joined, which you can check by delaying the callback and confirming chat, match updates and the lobby page still work. Open PR #48 already targets this, so coordinate with its author before starting.

由索引模型根据 Issue 内容生成。

描述

Reported in #bugs-and-issues: "I am in a game and it shows this" — [MultiplayerAPI] Chat is only available while in a lobby.

Why: lobby:leave() tears the lobby down in the lobby_leave RPC's callback. If that answer comes after the player is already in another lobby (left and quickly created, joined or got matched into a new one), the old lobby's L.cleanup runs against the new one:

  • MPAPI.chat.cleanup() switches chat off, so typing in the new lobby shows the message above.
  • nakama_lobby.forget() drops the new lobby's match, so it stops getting lobby updates (its host never sees the next player join).
  • on_lobby_disconnected() sends the player back to the mod menu while they are still in the new lobby.

To reproduce: delay the lobby_leave callback by ~3s (a slow answer), leave a lobby and create a new one right away. Once the late answer lands: chat is off, the host doesn't see a player who joins, and the lobby page is replaced by the mod menu.

Reproduced with two clients on a local server.

主要语言
Lua
星标
9
派生
4
平均合并
19 小时 50 分钟
30 天内合并 PR
11

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Balatro-Multiplayer/BalatroMultiplayerAPI 的其他 Issue

查看 Balatro-Multiplayer/BalatroMultiplayerAPI 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。