mirror of
https://github.com/nxshock/gonx.git
synced 2025-07-01 23:53:35 +05:00
Does not start TLS redirection on empty TLS config
This commit is contained in:
parent
e4f9a1a130
commit
59cb02bf94
1 changed files with 8 additions and 4 deletions
4
main.go
4
main.go
|
@ -38,11 +38,15 @@ func main() {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(config.TLS) > 0 {
|
||||||
err = app.restartTlsListener()
|
err = app.restartTlsListener()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("Failed to start TLS listener", slog.String("err", err.Error()))
|
slog.Error("Failed to start TLS listener", slog.String("err", err.Error()))
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
slog.Warn("TLS listener does not started because TLS redirection rules is empty")
|
||||||
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
slog.Debug("Starting HTTP listener", slog.String("addr", config.HttpListenAddr))
|
slog.Debug("Starting HTTP listener", slog.String("addr", config.HttpListenAddr))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue