From 805897afb5e74e075cd8ca6c96a16fc186506314 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 29 Sep 2013 04:04:46 +1000 Subject: [PATCH] Can't send to torrentFinished while handling an event --- client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 960e8af8..c34574fd 100644 --- a/client.go +++ b/client.go @@ -192,7 +192,9 @@ func (me *client) pieceHashed(ih infoHash, piece int, correct bool) { return } } - me.torrentFinished <- ih + go func() { + me.torrentFinished <- ih + }() } func (me *client) run() { -- 2.48.1