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.
Summary
handle_on_status()incrates/nodes/src/transport/rtmp_client.rs:1510-1523only treats onStatus codes containingError,Failed, orRejectedas terminal disconnects. A server responding withNetStream.Publish.BadName(or other non-Start, non-error codes) falls through to the catch-all arm, leaving the connection stuck inPublishPending.In the real node handshake loop (
crates/nodes/src/transport/rtmp.rs:493-497),PublishPendingis 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.Startas a terminal rejection when the connection is inPublishPendingstate — or at minimum addBadNameto the pattern match.Context
Discovered via test coverage in #503 — the
handle_on_status_bad_name_does_not_publishtest pins the current (broken) behavior.