Skip to content

bug: handle_on_status does not treat NetStream.Publish.BadName as terminal #507

@staging-devin-ai-integration

Description

Summary

handle_on_status() in crates/nodes/src/transport/rtmp_client.rs:1510-1523 only treats onStatus codes containing Error, Failed, or Rejected as terminal disconnects. A server responding with NetStream.Publish.BadName (or other non-Start, non-error codes) falls through to the catch-all arm, leaving the connection stuck in PublishPending.

In the real node handshake loop (crates/nodes/src/transport/rtmp.rs:493-497), PublishPending is neither success nor failure, so the connection waits until the 10s handshake timeout instead of surfacing the server's rejection immediately.

Suggested fix

Treat any onStatus code that is not NetStream.Publish.Start as a terminal rejection when the connection is in PublishPending state — or at minimum add BadName to the pattern match.

Context

Discovered via test coverage in #503 — the handle_on_status_bad_name_does_not_publish test pins the current (broken) behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions