mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-26 23:53:19 +08:00
close channels and allow daemon to shutdown
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
@ -300,6 +300,7 @@ func serveHTTPApi(req cmds.Request) (error, <-chan error) {
|
|||||||
errc := make(chan error)
|
errc := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
errc <- corehttp.Serve(node, apiLis.NetListener(), opts...)
|
errc <- corehttp.Serve(node, apiLis.NetListener(), opts...)
|
||||||
|
close(errc)
|
||||||
}()
|
}()
|
||||||
return nil, errc
|
return nil, errc
|
||||||
}
|
}
|
||||||
@ -355,6 +356,7 @@ func serveHTTPGateway(req cmds.Request) (error, <-chan error) {
|
|||||||
errc := make(chan error)
|
errc := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
errc <- corehttp.Serve(node, gwLis.NetListener(), opts...)
|
errc <- corehttp.Serve(node, gwLis.NetListener(), opts...)
|
||||||
|
close(errc)
|
||||||
}()
|
}()
|
||||||
return nil, errc
|
return nil, errc
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user