From 7ab4305b0d01b843dc50cb0e538697ab929716ec Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Sat, 25 Mar 2017 19:19:07 +0100 Subject: [PATCH] Close channel on exit --- shell.go | 1 + 1 file changed, 1 insertion(+) diff --git a/shell.go b/shell.go index 0c803a66e..9b122a0a7 100644 --- a/shell.go +++ b/shell.go @@ -389,6 +389,7 @@ func (s *Shell) FindProvs(ctx context.Context, cid string) (<-chan pstore.PeerIn outchan := make(chan pstore.PeerInfo, 4) go func() { + defer close(outchan) defer cancel() var n notif.QueryEvent