Add terminated status

This commit is contained in:
Owen
2025-11-30 17:52:57 -05:00
parent b601368cc7
commit 4a471713e7
2 changed files with 14 additions and 0 deletions

View File

@@ -167,6 +167,9 @@ func StartTunnel(config TunnelConfig) {
tunnelRunning = true // Also set it here in case it is called externally
// Reset terminated status when tunnel starts
apiServer.SetTerminated(false)
// debug print out the whole config
logger.Debug("Starting tunnel with config: %+v", config)
@@ -744,6 +747,7 @@ func StartTunnel(config TunnelConfig) {
olm.RegisterHandler("olm/terminate", func(msg websocket.WSMessage) {
logger.Info("Received terminate message")
apiServer.SetTerminated(true)
Close()
if globalConfig.OnTerminated != nil {