From 106dc4005dba8d76ca96452282e45fc9b090e1d9 Mon Sep 17 00:00:00 2001 From: Will Scott Date: Tue, 28 Apr 2020 08:40:05 -0700 Subject: [PATCH] clean up a channel that was dangling --- dht_net.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dht_net.go b/dht_net.go index 912d287c1..167fc9b1c 100644 --- a/dht_net.go +++ b/dht_net.go @@ -461,6 +461,7 @@ func (ms *messageSender) writeMsg(pmes *pb.Message) error { func (ms *messageSender) ctxReadMsg(ctx context.Context, mes *pb.Message) error { errc := make(chan error, 1) go func(r msgio.ReadCloser) { + defer close(errc) bytes, err := r.ReadMsg() defer r.ReleaseMsg(bytes) if err != nil {