mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: gracefully handling http.server starting errors
This commit is contained in:
parent
d7b6cdb8a1
commit
51667a039f
1 changed files with 2 additions and 1 deletions
|
@ -110,7 +110,8 @@ func (mod *HttpServer) Start() error {
|
|||
var err error
|
||||
mod.Info("starting on http://%s", mod.server.Addr)
|
||||
if err = mod.server.ListenAndServe(); err != nil && err != http.ErrServerClosed {
|
||||
panic(err)
|
||||
mod.Error("%v", err)
|
||||
mod.Stop()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue