mirror of
https://github.com/astaxie/beego.git
synced 2024-12-25 13:30:49 +00:00
Update app.go
This commit is contained in:
parent
8ed459512f
commit
bc2f1fb79d
12
app.go
12
app.go
@ -62,10 +62,14 @@ func (app *App) Run() {
|
||||
BeeLogger.Critical("ResolveTCPAddr:", err)
|
||||
}
|
||||
l, err = GetInitListener(laddr)
|
||||
theStoppable = newStoppable(l)
|
||||
err = server.Serve(theStoppable)
|
||||
theStoppable.wg.Wait()
|
||||
CloseSelf()
|
||||
if err == nil {
|
||||
theStoppable = newStoppable(l)
|
||||
err = server.Serve(theStoppable)
|
||||
if err == nil {
|
||||
theStoppable.wg.Wait()
|
||||
err = CloseSelf()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
s := &http.Server{
|
||||
Addr: addr,
|
||||
|
Loading…
Reference in New Issue
Block a user