Skip to content

Commit

Permalink
close channels and allow daemon to shutdown
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <[email protected]>
  • Loading branch information
whyrusleeping committed Jun 20, 2015
1 parent 370df8f commit 5ab9483
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 5ab9483

Please sign in to comment.