mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 04:52:10 -07:00
fix: gracefully handling https.server starting errors
This commit is contained in:
parent
51667a039f
commit
c830e64309
1 changed files with 2 additions and 1 deletions
|
@ -159,7 +159,8 @@ func (mod *HttpsServer) Start() error {
|
|||
return mod.SetRunning(true, func() {
|
||||
mod.Info("starting on https://%s", mod.server.Addr)
|
||||
if err := mod.server.ListenAndServeTLS(mod.certFile, mod.keyFile); err != nil && err != http.ErrServerClosed {
|
||||
panic(err)
|
||||
mod.Error("%v", err)
|
||||
mod.Stop()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue