Merge pull request #758 from itcrow/master

Fix issue #757

Former-commit-id: d3734c3acd128aef717506258bab0b1d7ac501ef
This commit is contained in:
Gerasimos (Makis) Maropoulos 2017-09-21 12:27:29 +03:00 committed by GitHub
commit e3563cff59

View File

@ -470,7 +470,7 @@ type Runner func(*Application) error
func Listener(l net.Listener, hostConfigs ...host.Configurator) Runner { func Listener(l net.Listener, hostConfigs ...host.Configurator) Runner {
return func(app *Application) error { return func(app *Application) error {
app.config.vhost = netutil.ResolveVHost(l.Addr().String()) app.config.vhost = netutil.ResolveVHost(l.Addr().String())
return app.NewHost(new(http.Server)). return app.NewHost(&http.Server{Addr: l.Addr().String()}).
Configure(hostConfigs...). Configure(hostConfigs...).
Serve(l) Serve(l)
} }