From 5b06fbffda826d50cf13a975f77888167a3bbf35 Mon Sep 17 00:00:00 2001 From: Morgan Kalvin Nrykkxyyyn Date: Mon, 4 Jan 2016 18:46:27 -0800 Subject: [PATCH] Fixed stream hangup bug --- rainbowstream/rainbow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index b15ef59..b65b705 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -1959,8 +1959,6 @@ def listen(): g['prefix'] = False else: g['prefix'] = True - # Release the semaphore lock - c['lock'] = False except EOFError: printNicely('') except TwitterHTTPError as e: @@ -1968,6 +1966,9 @@ def listen(): except Exception: debug_option() printNicely(red('OMG something is wrong with Twitter API right now.')) + finally: + # Release the semaphore lock + c['lock'] = False def reconn_notice(): -- 2.25.1