1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-28 07:17:06 +00:00

Iris 4.0.0-alpha.4. Book is finally updated https://kataras.gitbooks.io/iris/content/ also

This commit is contained in:
Gerasimos Maropoulos
2016-07-20 06:33:24 +03:00
parent 566a194836
commit 7ed5ed4519
9 changed files with 86 additions and 47 deletions

View File

@@ -254,7 +254,10 @@ type (
// newServer returns a pointer to a Server object, and set it's options if any, nothing more
func newServer(cfg config.Server) *Server {
s := &Server{Server: &fasthttp.Server{Name: config.ServerName}, Config: cfg}
if cfg.Name == "" {
cfg.Name = config.DefaultServerName
}
s := &Server{Server: &fasthttp.Server{Name: cfg.Name}, Config: cfg}
s.prepare()
return s
}