diff --git a/setup.py b/setup.py index 3c74d27..8263ad8 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setuptools.setup( name='ssc2ce', - version="0.12.1", + version="0.12.2", author='Oleg Nedbaylo', author_email='olned64@gmail.com', description='A Set of Simple Connectors for access To Cryptocurrency Exchanges', diff --git a/ssc2ce/deribit/deribit.py b/ssc2ce/deribit/deribit.py index a803d5b..fe58e0d 100644 --- a/ssc2ce/deribit/deribit.py +++ b/ssc2ce/deribit/deribit.py @@ -454,7 +454,11 @@ def handle_method_message(self, data) -> None: handler = resolve_route(method, self.method_routes) if handler: - handler(data) + if asyncio.iscoroutinefunction(handler): + asyncio.ensure_future(handler(data)) + else: + handler(data) + elif not self.on_before_handling: self.logger.warning(f"Unhandled message:{repr(data)}.")