Skip to content

Commit

Permalink
osbuild-jobsite-builder: disable http.Server timeouts
Browse files Browse the repository at this point in the history
Let's just rely on the timeouts surrounding the whole step.
  • Loading branch information
croissanne committed Mar 21, 2024
1 parent d3074fc commit f311adf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmd/osbuild-jobsite-builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,10 @@ func (builder *Builder) Serve() error {

mux.HandleFunc("/export", builder.RegisterHandler(builder.HandleExport))

/* #nosec G112 */
builder.net = &http.Server{
ReadTimeout: 1 * time.Second,
WriteTimeout: 1800 * time.Second,
IdleTimeout: 30 * time.Second,
ReadHeaderTimeout: 1 * time.Second,
Addr: fmt.Sprintf("%s:%d", builder.Host, builder.Port),
Handler: mux,
Addr: fmt.Sprintf("%s:%d", builder.Host, builder.Port),
Handler: mux,
}

return builder.net.ListenAndServe()
Expand Down

0 comments on commit f311adf

Please sign in to comment.