fix(gateway): close http-over-libp2p host when the node is ready to shutdown

This commit is contained in:
Adin Schmahmann 2023-08-31 04:07:10 -04:00
parent bc6bee1585
commit bf548a3cc6

View File

@ -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
}