mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 20:41:59 -08:00
do not wait for HTTP connections to close when shutting down the server (#2909)
This commit is contained in:
parent
514036d41a
commit
cd2495423a
1 changed files with 3 additions and 1 deletions
|
|
@ -86,6 +86,8 @@ func NewWrappedServer(
|
|||
|
||||
// Close closes all resources and waits for all routines to return.
|
||||
func (s *WrappedServer) Close() {
|
||||
s.inner.Shutdown(context.Background())
|
||||
ctx, ctxCancel := context.WithCancel(context.Background())
|
||||
ctxCancel()
|
||||
s.inner.Shutdown(ctx)
|
||||
s.ln.Close() // in case Shutdown() is called before Serve()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue