Skip to content

Recording not stopped when recorder disconnects (headless Chromium leak) #985

@hweihwang

Description

@hweihwang

Steps to reproduce

  1. Create a new whiteboard
  2. Start recording; draw a bit
  3. Close the whiteboard tab while recording

Actual

  • Recording process (headless Chromium) keeps running on server
  • Recording entry persists; reopening shows recording in progress

Expected

  • When the recorder leaves (last socket for user), recording stops and cleans up
  • Recording state cleared for room/user

Impact

  • Orphaned Chromium processes; resource leak
  • User stuck in recording until manual stop

Suspected cause

  • RoomLifecycleService.onDisconnecting ends presentation but does not handle recordings
  • Only explicit stop-recording stops recording; no unload/leave hook
  • Sweeper only clears dead nodes, not normal disconnect
  • tests/integration/multinode-redis.spec.mjs currently assumes recordings persist across disconnect

Possible fix

  • On disconnecting, if recorder has no other sockets in room, trigger recording stop (local or forwarded) and remove entry
  • Update tests to reflect expected stop-on-leave behavior

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions