Commit 990ec15
committed
fix: delete host entry before awaiting close to prevent stale-client race
If getOrCreateClient ran after refCount hit 0 but before clients.delete(host),
it would receive a closing TelemetryClient. Deleting synchronously first means
any concurrent caller gets a fresh instance instead.
Co-authored-by: samikshya-chand_data1 parent d009957 commit 990ec15
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
96 | 98 | | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
0 commit comments