Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 11, 22:15 UTC
http: disable keepalive when KeepAliveInterval is negative (#7158)
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
WeidiDeng committed
Aug 21, 2025 at 05:31 UTC
fdf610850b5e5dcb518eb2ad475817d6990b8a8d
1 file changed
+1
-1
modules/caddyhttp/app.go
+1
-1
@@ -533,7 +533,7 @@ func (app *App) Start() error {
533
// create the listener for this socket
534
lnAny, err := listenAddr.Listen(app.ctx, portOffset, net.ListenConfig{
535
KeepAliveConfig: net.KeepAliveConfig{
536
- Enable: srv.KeepAliveInterval != 0,
536
+ Enable: srv.KeepAliveInterval >= 0,
537
Interval: time.Duration(srv.KeepAliveInterval),
538
},
539
})