Repository navigation
Commit 8b2bdb0
committed
fix(provider-webdriver): keep a releasing lease owned until disposal ends
A release took a lease out of the manager's map and then waited on the hub, so a fresh allocation in that window saw a free lease and rented a second billed session the release never saw, and a shutdown that arrived there answered with the first session still live.
A repeated allocation validated its flags after reading the live session, so a teardown landing inside that await left the caller told the lease was held by a session that no longer existed. A shutdown whose DELETE was refused reported a clean close, and the allocation refused for that session was told nothing needed cleaning up.
A lease entry now keeps owning its session while it is being ended: the take and the one disposal it starts are recorded in the same synchronous step, the entry leaves the map only once that disposal settles, and a second release or a shutdown joins it. An allocation reports the disposal it waited on, naming the session and whether its end is confirmed, pending, or failed; a shutdown that could not stop a session now fails the way a plugin cleanup failure is reported at close. Every allocation is refused for its own refused profile flags before it joins or publishes anything.1 parent 0f58d95 commit 8b2bdb0
3 files changed
Lines changed: 733 additions & 215 deletions
File tree
- packages/provider-webdriver/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments