mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
fix(gateway): close http-over-libp2p host when the node is ready to shutdown
This commit is contained in:
parent
bc6bee1585
commit
bf548a3cc6
@ -943,6 +943,11 @@ func serveTrustlessGatewayOverLibp2p(cctx *oldcmds.Context) (<-chan error, error
|
||||
errc <- h.Serve()
|
||||
}()
|
||||
|
||||
go func() {
|
||||
<-node.Process.Closing()
|
||||
h.Close()
|
||||
}()
|
||||
|
||||
return errc, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user