Hubs-Foundation / dialog

Mediasoup based WebRTC SFU
Mozilla Public License 2.0
71 stars 84 forks source link

Issues with _pid and router._producers causing worker idling and errors #53

Open klee1611 opened 7 months ago

klee1611 commented 7 months ago

Description: I have encountered a couple of issues in the current codebase that are impacting the proper functioning of the application. I am planning to create a Pull Request to address these concerns, and I wanted to document them here for better visibility and discussion.

  1. The _pids of workers are currently undefined, preventing the proper distribution of routers across different workers. As a result, all workers except one are idled. This is a critical issue as it significantly impacts the efficiency of the system.

  2. After adding _pids to workers, when piping producers to routers, the expression router._producers.has(producerId) is throwing errors. This error disrupts the expected flow of data distribution and must be addressed to ensure the smooth operation of the application.

Expected Behavior:

  1. Workers should have valid _pids to enable proper distribution of routers.
  2. Piping producers to routers should not result in errors related to router._producers.has(producerId).

I will be working on creating a Pull Request to fix these issues.

Note to Reviewers: I am in the process of creating a Pull Request to address these issues. Your insights and guidance during the review process will be invaluable.

Thank you!