Chat says it's only available in a lobby while you're in one (late leave answer tears down the new lobby)
维护者通常 1 天内回复
评估
- 难度
- 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,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Balatro-Multiplayer/BalatroMultiplayerAPI 的其他 Issue
-
Replay skips booster packs opened with the shop OPEN button可能已有人在做 @Jr-JoshS 于 3 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
Balatro-Multiplayer/BalatroMultiplayerAPI#49 ·
维护者通常 1 天内回复
-
Lobby screen stays drawn behind the run after the game starts可能已有人在做 @Jr-JoshS 于 3 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 20/100
Balatro-Multiplayer/BalatroMultiplayerAPI#44 ·
维护者通常 1 天内回复
-
Match History doesn't show the rating change per match可能已有人在做 @Jr-JoshS 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 30/100
Balatro-Multiplayer/BalatroMultiplayerAPI#42 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
Balatro-Multiplayer/BalatroMultiplayerAPI#14 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
Balatro-Multiplayer/BalatroMultiplayerAPI#13 ·
维护者通常 1 天内回复
查看 Balatro-Multiplayer/BalatroMultiplayerAPI 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 88/100
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
version-fox/vfox#746 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
windwp/nvim-autopairs#554 · 1 条评论 ·