diff options
-rw-r--r-- | mastodon/Mastodon.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 88f4906..1802cd1 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -1305,10 +1305,14 @@ 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() | ||
1308 | 1309 | ||
1309 | def close(self): | 1310 | def close(self): |
1310 | self.connection.close() | 1311 | self.connection.close() |
1311 | 1312 | ||
1313 | def is_alive(self): | ||
1314 | return self._thread.is_alive() | ||
1315 | |||
1312 | def _threadproc(self): | 1316 | def _threadproc(self): |
1313 | with closing(connection) as r: | 1317 | with closing(connection) as r: |
1314 | try: | 1318 | try: |