Commit 3e3cbffd authored by eckhart's avatar eckhart

- server.py: compatibility with pypy3 (e.g. python 3.6) fixed

parent c5b90ba1
......@@ -41,6 +41,7 @@ For JSON see:
https://json.org/
"""
# TODO: Test with python 3.5
import asyncio
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, CancelledError
......@@ -54,6 +55,7 @@ from DHParser.syntaxtree import DHParser_JSONEncoder
from DHParser.toolkit import get_config_value, re
from DHParser.versionnumber import __version__
__all__ = ('RPC_Table',
'RPC_Type',
'JSON_Type',
......@@ -400,7 +402,7 @@ class Server:
self.loop.run_forever()
finally:
self.server.close()
self.server.wait_closed()
asyncio_run(self.server.wait_closed())
def _empty_message_queue(self):
while not self.server_messages.empty():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment