diff --git a/DESCRIPTION.rst b/DESCRIPTION.rst index f8647a5..aa3a6f2 100644 --- a/DESCRIPTION.rst +++ b/DESCRIPTION.rst @@ -1,8 +1,10 @@ signalr-client-threads -================= +====================== Python client proxy for `SignalR `_. +*Note: This is currently not compatible with ASP.NET Core SignalR (.NET Core 2.1), due to some changes in SignalR protocol there.* + Requirements ------------ diff --git a/setup.py b/setup.py index b370a4c..ba7c2fb 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='signalr-client-threads', - version='0.0.8', + version='0.0.9', description='Fork of SignalR client for Python based on threads instead of gevent', long_description=long_description, url='https://github.com/PawelTroka/signalr-client-threads', @@ -27,6 +27,8 @@ 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ], keywords='signalr', packages=find_packages(), diff --git a/signalr/__init__.py b/signalr/__init__.py index 06772e1..da2a544 100644 --- a/signalr/__init__.py +++ b/signalr/__init__.py @@ -1,3 +1,3 @@ from ._connection import Connection -__version__ = '0.0.7' +__version__ = '0.0.9' diff --git a/signalr/_connection.py b/signalr/_connection.py index 4560c6d..94e3465 100644 --- a/signalr/_connection.py +++ b/signalr/_connection.py @@ -1,4 +1,5 @@ import json +import sys from threading import Thread from signalr.events import EventHook from signalr.hubs import Hub @@ -19,6 +20,7 @@ def __init__(self, url, session): self.error = EventHook() self.starting = EventHook() self.stopping = EventHook() + self.exception = EventHook() self.is_open = False self.__transport = AutoTransport(session, self) self.__listener_thread = None @@ -52,7 +54,10 @@ def start(self): def wrapped_listener(): while self.is_open: - listener() + try: + listener() + except: + self.exception.fire(*sys.exc_info()) self.is_open = True self.__listener_thread = Thread(target=wrapped_listener)