Commit 7da6885
Avoid leaking session.
The retry on session creation uses `future.get(timeout)` but does not cancel the in-flight `createSession` future when a timeout occurs. If attempt 1 eventually completes after attempt 2 starts, it can leave an orphaned session registered in the client (and potentially race `getLastSessionId` persistence), reintroducing flakiness and leaking resources. Capture the future and cancel it on timeout before retrying.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>1 parent a228c57 commit 7da6885
1 file changed
Lines changed: 8 additions & 5 deletions
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
| 761 | + | |
| 762 | + | |
761 | 763 | | |
762 | | - | |
763 | | - | |
764 | | - | |
| 764 | + | |
765 | 765 | | |
766 | 766 | | |
| 767 | + | |
767 | 768 | | |
768 | 769 | | |
769 | 770 | | |
770 | 771 | | |
771 | | - | |
772 | | - | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
773 | 775 | | |
| 776 | + | |
774 | 777 | | |
775 | 778 | | |
776 | 779 | | |
| |||
0 commit comments