Skip to content

Fix resource leaks in DirectLineStreaming after end() is called#452

Open
orgads wants to merge 1 commit intomicrosoft:masterfrom
orgads:dl-streaming-leaks
Open

Fix resource leaks in DirectLineStreaming after end() is called#452
orgads wants to merge 1 commit intomicrosoft:masterfrom
orgads:dl-streaming-leaks

Conversation

@orgads
Copy link
Contributor

@orgads orgads commented Feb 12, 2026

  • Cancel pending timers on end() via AbortController-aware sleep()
  • Stop refreshToken() loop early on abort and after fatal 403
  • Unsubscribe from connectionStatus$ in waitUntilOnline() on resolve/reject
  • Use cancellable sleep() for retry delays in connectWithRetryAsync()
  • Add unit tests covering all leak fixes (sync and async paths)

Fixes #433

- Cancel pending timers on end() via AbortController-aware sleep()
- Stop refreshToken() loop early on abort and after fatal 403
- Unsubscribe from connectionStatus$ in waitUntilOnline() on resolve/reject
- Use cancellable sleep() for retry delays in connectWithRetryAsync()
- Add unit tests covering all leak fixes (sync and async paths)

Fixes microsoft#433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streaming mode keeps refreshing the token for 45 minutes

1 participant