Describe the bug
The startPolling utility in PollingLoop.ts initiates a recursive setTimeout loop but provides no way to stop it. This causes tasks like
PrivilegeRefresher or Matchmaking to continue polling forever even when the component is logically destroyed or when the server is shutting down.
To Reproduce:
1.Call startPolling with a task.
2.Attempt to stop the polling when it's no longer needed (e.g., during worker shutdown).
3.Observe that the polling continues indefinitely.
Expected behavior:
startPolling
should return a "stop" function or a handle that allows cancellation of the loop.
Desktop:
OS: Arch
Browser: Firefox
Version: Latest
Additional context Affected file:
src/server/PollingLoop.ts
This prevents clean shutdowns and dynamic resource management.
This was sadly introduced by me
Describe the bug
The startPolling utility in PollingLoop.ts initiates a recursive setTimeout loop but provides no way to stop it. This causes tasks like
PrivilegeRefresher or Matchmaking to continue polling forever even when the component is logically destroyed or when the server is shutting down.
To Reproduce:
1.Call startPolling with a task.
2.Attempt to stop the polling when it's no longer needed (e.g., during worker shutdown).
3.Observe that the polling continues indefinitely.
Expected behavior:
startPolling
should return a "stop" function or a handle that allows cancellation of the loop.
Desktop:
OS: Arch
Browser: Firefox
Version: Latest
Additional context Affected file:
src/server/PollingLoop.ts
This prevents clean shutdowns and dynamic resource management.
This was sadly introduced by me