From f8426bc8d358190fd5c97305555e0bc14b807054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Delattre?= Date: Sat, 22 Aug 2015 18:39:39 +0200 Subject: [PATCH] Fix Close method so Subtitle could be a ReadCloser --- addicted.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addicted.go b/addicted.go index fc751c0..9391e1d 100644 --- a/addicted.go +++ b/addicted.go @@ -65,10 +65,12 @@ func (sub *Subtitle) Read(p []byte) (int, error) { } // Close close subtitle's connection -func (sub *Subtitle) Close() { +func (sub *Subtitle) Close() error { if sub.conn != nil { - sub.conn.Close() + return sub.conn.Close() } + + return nil } // ByDownloads helper for sorting