What's going on?
When two HTTP clients connect to a server started with --isolated, they share one browser but get separate browser contexts. If one client terminates while the other remains connected, the terminated client's context stays open until the last client disconnects.
Reproduce:
- start the MCP server with
--port=8931 --isolated;
- connect two Streamable HTTP clients and navigate from both.
- Terminate the first session.
- From the second session check
page.context().browser().contexts().length.
It remains 2; it should be 1.
This is related to #40709, but concerns per-client context cleanup after disconnect rather than duplicate browser launches.
Version
1.62.0-next (main)
What's going on?
When two HTTP clients connect to a server started with
--isolated, they share one browser but get separate browser contexts. If one client terminates while the other remains connected, the terminated client's context stays open until the last client disconnects.Reproduce:
--port=8931 --isolated;page.context().browser().contexts().length.It remains
2; it should be1.This is related to #40709, but concerns per-client context cleanup after disconnect rather than duplicate browser launches.
Version
1.62.0-next (main)