mirror of
https://github.com/nxshock/gonx.git
synced 2025-06-30 23:43: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
12
main.go
12
main.go
|
@ -38,10 +38,14 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
err = app.restartTlsListener()
|
||||
if err != nil {
|
||||
slog.Error("Failed to start TLS listener", slog.String("err", err.Error()))
|
||||
os.Exit(1)
|
||||
if len(config.TLS) > 0 {
|
||||
err = app.restartTlsListener()
|
||||
if err != nil {
|
||||
slog.Error("Failed to start TLS listener", slog.String("err", err.Error()))
|
||||
os.Exit(1)
|
||||
}
|
||||
} else {
|
||||
slog.Warn("TLS listener does not started because TLS redirection rules is empty")
|
||||
}
|
||||
|
||||
go func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue