mirror of https://github.com/jetkvm/kvm.git
fix: handle mDNS initialization error without exiting the application
This commit is contained in:
parent
5933adb23b
commit
502cd4ecc2
2
main.go
2
main.go
|
|
@ -53,6 +53,7 @@ func Main() {
|
||||||
// Initialize network
|
// Initialize network
|
||||||
if err := initNetwork(); err != nil {
|
if err := initNetwork(); err != nil {
|
||||||
logger.Error().Err(err).Msg("failed to initialize network")
|
logger.Error().Err(err).Msg("failed to initialize network")
|
||||||
|
// TODO: reset config to default
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,7 +64,6 @@ func Main() {
|
||||||
// Initialize mDNS
|
// Initialize mDNS
|
||||||
if err := initMdns(); err != nil {
|
if err := initMdns(); err != nil {
|
||||||
logger.Error().Err(err).Msg("failed to initialize mDNS")
|
logger.Error().Err(err).Msg("failed to initialize mDNS")
|
||||||
os.Exit(1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initPrometheus()
|
initPrometheus()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue