Skip to content

Commit

Permalink
Fix HTTP port
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Jun 5, 2022
1 parent 82af1a3 commit af3c9a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/tftp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ type Server struct {
}

func NewServer(addr string, http string) *Server {
_, port, _ := net.SplitHostPort(addr) // already validated
_, httpPort, _ := net.SplitHostPort(http) // already validated
return &Server{
Addr: addr,
chain: strings.Replace(chainTemplate, "HTTP_PORT", port, 1),
chain: strings.Replace(chainTemplate, "HTTP_PORT", httpPort, 1),
}
}

Expand Down

0 comments on commit af3c9a6

Please sign in to comment.