From 20eb65be57b6fe507419feb20b93c266bf5e422a Mon Sep 17 00:00:00 2001 From: Lyntor Paul Figueroa Date: Thu, 9 Jun 2016 22:15:33 +0800 Subject: [PATCH 1/2] Fix missing host in addr string --- server/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/server.go b/server/server.go index 9e200c51..16513545 100644 --- a/server/server.go +++ b/server/server.go @@ -89,14 +89,14 @@ func NewServer(config *Config) (*Server, error) { return s, nil } -func (s *Server) Run(host, port string) error { +func (s *Server) Run(host string, port string) error { if err := s.Start(host, port); err != nil { return err } return s.Wait() } -func (s *Server) Start(host, port string) error { +func (s *Server) Start(host string, port string) error { s.Infof("Fingerprint %s", s.fingerprint) if len(s.Users) > 0 { s.Infof("User authenication enabled") @@ -106,7 +106,7 @@ func (s *Server) Start(host, port string) error { } s.Infof("Listening on %s...", port) - return s.httpServer.GoListenAndServe(":"+port, http.HandlerFunc(s.handleHTTP)) + return s.httpServer.GoListenAndServe(host+":"+port, http.HandlerFunc(s.handleHTTP)) } func (s *Server) Wait() error { From 5398b7dd6ac2e8e036e601ee314622b9a947eac7 Mon Sep 17 00:00:00 2001 From: Lyntor Paul Figueroa Date: Fri, 10 Jun 2016 19:19:37 +0800 Subject: [PATCH 2/2] Remove unnecessary changes --- server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server.go b/server/server.go index 16513545..1f3a2df8 100644 --- a/server/server.go +++ b/server/server.go @@ -89,14 +89,14 @@ func NewServer(config *Config) (*Server, error) { return s, nil } -func (s *Server) Run(host string, port string) error { +func (s *Server) Run(host, port string) error { if err := s.Start(host, port); err != nil { return err } return s.Wait() } -func (s *Server) Start(host string, port string) error { +func (s *Server) Start(host, port string) error { s.Infof("Fingerprint %s", s.fingerprint) if len(s.Users) > 0 { s.Infof("User authenication enabled")