Skip to content

fix(lua.core): server loses pending response on concurrent request #196

Description

@S1M0N38

Ref: PR #190

Description

When a long-running request (like play) is in progress and a second request is sent before it completes, the first request's response is lost. The client receives 0 bytes for the first request while the second request's response arrives normally.

Steps to Reproduce

  1. Start a run and select a blind
  2. Send play({"cards": [0,1,2,3,4]})
  3. 100ms later, send gamestate({}) before play has finished
  4. The play response is lost (empty), while the gamestate response arrives correctly

A reproduction script is provided (script.py).

Expected Behavior

The server should either:

  • Queue the second request and respond after the first completes, OR
  • Reject the second request with a 503 "Service Unavailable" error

In no case should a response be silently lost.

Actual Behavior

The play response is 0 bytes. The response body is completely missing — the server closes the first connection without writing the pending response.

Environment

  • OS: macOS
  • Lovely version: 0.8.0
  • SMODS version: v1.0.0~BETA-1221a
  • BalatroBot commit: 084044e

Files

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions