@cryptotaxi247 / kubo / commits / bf548a3cc

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

Adin Schmahmann committed Aug 31, 2023 at 04:07 UTC bf548a3cc625438828aaae9a081b0a97dfb0e821
1 file changed +5
cmd/ipfs/daemon.go
+5
@@ -943,6 +943,11 @@ func serveTrustlessGatewayOverLibp2p(cctx *oldcmds.Context) (<-chan error, error
943 errc <- h.Serve()
944 }()
945
946 + go func() {
947 + <-node.Process.Closing()
948 + h.Close()
949 + }()
950 +
951 return errc, nil
952 }
953