From: Matt Joiner Date: Sat, 28 Sep 2013 18:04:46 +0000 (+1000) Subject: Can't send to torrentFinished while handling an event X-Git-Tag: v1.0.0~1818 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=805897afb5e74e075cd8ca6c96a16fc186506314;p=btrtrc.git Can't send to torrentFinished while handling an event --- 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() {