mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-19 07:59:34 +00:00
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.
This commit is contained in:
parent
f5e390d0d0
commit
c2005f4f7a
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ from flask import Flask, request
|
|||
from helpers import runtime, dotenv, process
|
||||
from helpers.print_style import PrintStyle
|
||||
|
||||
from api.tunnel import Tunnel
|
||||
from api.tunnel import Tunnel, stop
|
||||
|
||||
# initialize the internal Flask server
|
||||
app = Flask("app")
|
||||
|
|
@ -50,7 +50,7 @@ def run():
|
|||
finally:
|
||||
# Clean up tunnel if it was started
|
||||
if tunnel:
|
||||
tunnel.stop()
|
||||
stop()
|
||||
|
||||
|
||||
# run the internal server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue