From 8de1a9d4a266968b6d19fd0b059aa92d3ba3737c Mon Sep 17 00:00:00 2001 From: itcrow Date: Wed, 20 Sep 2017 15:15:54 +0300 Subject: [PATCH] Fix issue #757 Fix not correct host in "Now listening on:" message when using iris.Listener Former-commit-id: a4f071e936c86a425a84986285625de542bb6d33 --- iris.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iris.go b/iris.go index 62310740..6b33caa9 100644 --- a/iris.go +++ b/iris.go @@ -470,7 +470,7 @@ type Runner func(*Application) error func Listener(l net.Listener, hostConfigs ...host.Configurator) Runner { return func(app *Application) error { 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...). Serve(l) }