mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 19:07:48 +08:00
Merge pull request #1405 from ipfs/daemon-shutdown
close channels and allow daemon to shutdown
This commit is contained in:
commit
594c1bfa2a
@ -300,6 +300,7 @@ func serveHTTPApi(req cmds.Request) (error, <-chan error) {
|
||||
errc := make(chan error)
|
||||
go func() {
|
||||
errc <- corehttp.Serve(node, apiLis.NetListener(), opts...)
|
||||
close(errc)
|
||||
}()
|
||||
return nil, errc
|
||||
}
|
||||
@ -355,6 +356,7 @@ func serveHTTPGateway(req cmds.Request) (error, <-chan error) {
|
||||
errc := make(chan error)
|
||||
go func() {
|
||||
errc <- corehttp.Serve(node, gwLis.NetListener(), opts...)
|
||||
close(errc)
|
||||
}()
|
||||
return nil, errc
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user