mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-05 12:28:55 +00:00
🐛 os.Exit
after returning from the HTTP handler
This commit is contained in:
parent
a4d35599df
commit
4216f07ec7
@ -5,6 +5,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/creasty/defaults"
|
"github.com/creasty/defaults"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@ -71,11 +72,14 @@ func updateLicense(licenseKey string) {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
go func() {
|
||||||
connector.PostLicense(config.Config.License)
|
connector.PostLicense(config.Config.License)
|
||||||
|
|
||||||
log.Info().Msg("Updated the license. Exiting.")
|
log.Info().Msg("Updated the license. Exiting.")
|
||||||
|
|
||||||
|
time.Sleep(2 * time.Second)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
func runLicenseRecieverServer() {
|
func runLicenseRecieverServer() {
|
||||||
|
Loading…
Reference in New Issue
Block a user