Skip to content

Commit 20eb65b

Browse files
author
Lyntor Paul Figueroa
committed
Fix missing host in addr string
1 parent 1382a4a commit 20eb65b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ func NewServer(config *Config) (*Server, error) {
8989
return s, nil
9090
}
9191

92-
func (s *Server) Run(host, port string) error {
92+
func (s *Server) Run(host string, port string) error {
9393
if err := s.Start(host, port); err != nil {
9494
return err
9595
}
9696
return s.Wait()
9797
}
9898

99-
func (s *Server) Start(host, port string) error {
99+
func (s *Server) Start(host string, port string) error {
100100
s.Infof("Fingerprint %s", s.fingerprint)
101101
if len(s.Users) > 0 {
102102
s.Infof("User authenication enabled")
@@ -106,7 +106,7 @@ func (s *Server) Start(host, port string) error {
106106
}
107107
s.Infof("Listening on %s...", port)
108108

109-
return s.httpServer.GoListenAndServe(":"+port, http.HandlerFunc(s.handleHTTP))
109+
return s.httpServer.GoListenAndServe(host+":"+port, http.HandlerFunc(s.handleHTTP))
110110
}
111111

112112
func (s *Server) Wait() error {

0 commit comments

Comments
 (0)