How can I break active connections

71 views
Skip to first unread message

张韬

unread,
Jul 28, 2021, 11:30:31 AM7/28/21
to headless-dev

Hi

Thank you for your contributions to this project, is very helpful to me in my work.

I use Chrome-headless and PPTR to work with my test framework. Recently I've had a problem that's been bothering me for a long time.I need to break tcp connect before a new request to same host.

I tried both methods but neither worked

1.I try to open a new page visit chrome://net-internals/#sockets then click the <button flush socket pools/>,but is not working to open it in headless.

2.use devTools and --enable-net-benchmarking ,code like 

cdp.send('Runtime.evaluate', {

    expression: "chrome.benchmarking.closeConnections()"

});

I wonder if there's a way to do it unless re-open chrome

Thanks

Naveenraj Muthuraj

unread,
Dec 15, 2023, 5:36:51 PM12/15/23
to headless-dev, 张韬
Hi

I just wanted to confirm same observations, that chrome has different behaviour when used with headless mode.
When chrome is opened using headless mode (--headless) , "chrome.benchmarking.closeConnections()" through Runtime evaluate does not work. However, the same method will work in non headless mode, helping me to clear connection. Hence, I ended up using xvfb-run to launch chrome without headless. 

Thanks

Jerry Lee Daniel

unread,
Mar 10, 2024, 5:40:39 PMMar 10
to headless-dev, Naveenraj Muthuraj, 张韬

Loans, Project and Digital Investment financing available up to $500m.
Have a Business Plan, Fundable Project and Redeemable Collateral.

Whatsapp: +1 (620) 698 1272
Reply all
Reply to author
Forward
0 new messages