mirror of
https://github.com/fosrl/olm.git
synced 2026-02-27 23:36:46 +00:00
Add terminated status
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user