From 6211ee46c2e90e6439a8c413d449fe3cad868b26 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Fri, 19 Jun 2015 22:39:33 -0700 Subject: [PATCH] close channels and allow daemon to shutdown License: MIT Signed-off-by: Jeromy --- cmd/ipfs/daemon.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index 61c5617a1ea..c50551f27bb 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -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 }