How can http.Server be made to hold open a connection? [closed]

4 weeks ago 34
ARTICLE AD BOX

-2

I'd like to test Go's http.Server.Shutdown() timing out, but there are no connections held open when the shutdown signal is sent, so it never gets to checking for timeouts, even though the timeout is in the past.

How can I convince an http.Server that it has connections open and is waiting for them to close?

jonrsharpe's user avatar

jonrsharpe

123k31 gold badges278 silver badges488 bronze badges

asked 7 hours ago

theory's user avatar

1

1

Err, open some? From client browsers?

2025-12-29 00:55:38 +00:00

Commented 6 hours ago

Read Entire Article