1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-24 19:20:55 +00:00

Update app.go

This commit is contained in:
Francois 2014-05-13 17:19:50 +02:00
parent 8ed459512f
commit bc2f1fb79d

6
app.go
View File

@ -62,10 +62,14 @@ func (app *App) Run() {
BeeLogger.Critical("ResolveTCPAddr:", err) BeeLogger.Critical("ResolveTCPAddr:", err)
} }
l, err = GetInitListener(laddr) l, err = GetInitListener(laddr)
if err == nil {
theStoppable = newStoppable(l) theStoppable = newStoppable(l)
err = server.Serve(theStoppable) err = server.Serve(theStoppable)
if err == nil {
theStoppable.wg.Wait() theStoppable.wg.Wait()
CloseSelf() err = CloseSelf()
}
}
} else { } else {
s := &http.Server{ s := &http.Server{
Addr: addr, Addr: addr,