Files
gstack/browse
Garry Tanandcapy-ai[bot] ba2289e1cd Stop concurrent browse tunnel starts from leaking an ngrok session (GST-2117) (#4210)
Two /tunnel/start calls that both saw the tunnel off each opened an ngrok
session; the daemon kept only the second, so the first stayed public and
closeTunnel could not reach it. ctx.tunnel.start is now single-flight, so a
concurrent caller shares the in-flight start and its URL.

A start that failed after ngrok.forward() reset only tunnelListener, leaving
tunnelActive, tunnelUrl and tunnelServer set, so the daemon never idled out.
The catch now clears all four.

Tests found and first written by GEVA-449's pstack verification.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-09 11:42:34 +00:00
..