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

Ouverte
#47 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@Jr-JoshS y travaille déjà.

Depuis le 31/10/2026.

  • #48 par @Jr-JoshS — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
lua
Domaine
api, networking

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Lua
Étoiles
9
Forks
4
Merge moyen
19 h 50 min
PR mergées (30 j)
11

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Balatro-Multiplayer/BalatroMultiplayerAPI

Toutes les issues de Balatro-Multiplayer/BalatroMultiplayerAPI

Issues similaires

Plus d'issues Lua

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.