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

Merge pull request #605 from francoishill/patch-6

Update app.go
This commit is contained in:
astaxie 2014-05-14 13:12:15 +08:00
commit b6d63c84ae

6
app.go
View File

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