Call stop() for tunnel cleanup

Import the stop function from api.tunnel and use stop() in the finally cleanup instead of calling tunnel.stop(). This centralizes shutdown logic and ensures the tunnel is torn down via the module-level cleanup routine.

frdel committed Mar 6, 2026 at 09:14 UTC c2005f4f7a12fd74d1a16ea97a99b20656d775f9
1 file changed +2 -2
run_tunnel.py
+2 -2
@@ -3,7 +3,7 @@ from flask import Flask, request
3 from helpers import runtime, dotenv, process
4 from helpers.print_style import PrintStyle
5
6 -from api.tunnel import Tunnel
6 +from api.tunnel import Tunnel, stop
7
8 # initialize the internal Flask server
9 app = Flask("app")
@@ -50,7 +50,7 @@ def run():
50 finally:
51 # Clean up tunnel if it was started
52 if tunnel:
53 - tunnel.stop()
53 + stop()
54
55
56 # run the internal server