Skip to content

Commit

Permalink
fix(gateway): close http-over-libp2p host when the node is ready to s…
Browse files Browse the repository at this point in the history
…hutdown
  • Loading branch information
aschmahmann committed Aug 31, 2023
1 parent bc6bee1 commit bf548a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit bf548a3

Please sign in to comment.