From 33d7d994d41c9ec1870771bd0a22f8e1d2360218 Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 19 Sep 2013 23:16:49 +0200 Subject: [PATCH] Don't try to finish an already closed connection --- couchpotato/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/couchpotato/api.py b/couchpotato/api.py index a9f449be..b6135583 100644 --- a/couchpotato/api.py +++ b/couchpotato/api.py @@ -50,7 +50,8 @@ class NonBlockHandler(RequestHandler): self.finish(response) except: log.error('Failed doing nonblock request: %s', (traceback.format_exc())) - self.finish({'success': False, 'error': 'Failed returning results'}) + try: self.finish({'success': False, 'error': 'Failed returning results'}) + except: pass def on_connection_close(self):