Skip to content

Commit af3c9a6

Browse files
committed
Fix HTTP port
1 parent 82af1a3 commit af3c9a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/tftp/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ type Server struct {
1818
}
1919

2020
func NewServer(addr string, http string) *Server {
21-
_, port, _ := net.SplitHostPort(addr) // already validated
21+
_, httpPort, _ := net.SplitHostPort(http) // already validated
2222
return &Server{
2323
Addr: addr,
24-
chain: strings.Replace(chainTemplate, "HTTP_PORT", port, 1),
24+
chain: strings.Replace(chainTemplate, "HTTP_PORT", httpPort, 1),
2525
}
2626
}
2727

0 commit comments

Comments
 (0)