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 ae66308 commit d2ced05
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()
}()

Check warning on line 944 in cmd/ipfs/daemon.go

View check run for this annotation

Codecov / codecov/patch

cmd/ipfs/daemon.go#L928-L944

Added lines #L928 - L944 were not covered by tests

go func() {
<-node.Process.Closing()
h.Close()
}()

Check warning on line 949 in cmd/ipfs/daemon.go

View check run for this annotation

Codecov / codecov/patch

cmd/ipfs/daemon.go#L946-L949

Added lines #L946 - L949 were not covered by tests

return errc, nil

Check warning on line 951 in cmd/ipfs/daemon.go

View check run for this annotation

Codecov / codecov/patch

cmd/ipfs/daemon.go#L951

Added line #L951 was not covered by tests
}

Expand Down

0 comments on commit d2ced05

Please sign in to comment.