diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 1802cd1..3eb2cd7 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -1305,7 +1305,6 @@ class Mastodon: | |||
1305 | class __stream_handle(): | 1305 | class __stream_handle(): |
1306 | def __init__(self, connection): | 1306 | def __init__(self, connection): |
1307 | self.connection = connection | 1307 | self.connection = connection |
1308 | self._thread = threading.current_thread() | ||
1309 | 1308 | ||
1310 | def close(self): | 1309 | def close(self): |
1311 | self.connection.close() | 1310 | self.connection.close() |
@@ -1314,6 +1313,7 @@ class Mastodon: | |||
1314 | return self._thread.is_alive() | 1313 | return self._thread.is_alive() |
1315 | 1314 | ||
1316 | def _threadproc(self): | 1315 | def _threadproc(self): |
1316 | self._thread = threading.current_thread() | ||
1317 | with closing(connection) as r: | 1317 | with closing(connection) as r: |
1318 | try: | 1318 | try: |
1319 | listener.handle_stream(r.iter_lines()) | 1319 | listener.handle_stream(r.iter_lines()) |