|
|
@ -38,9 +38,12 @@ def main_loop(): |
|
|
|
future.cancel() |
|
|
|
|
|
|
|
def on_exception(loop, context): |
|
|
|
'''Suppress spurious messages it appears we cannot control.''' |
|
|
|
message = context.get('message') |
|
|
|
if not message in SUPPRESS_MESSAGES: |
|
|
|
loop.default_exception_handler(context) |
|
|
|
if not ('task' in context and |
|
|
|
'accept_connection2()' in repr(context.get('task'))): |
|
|
|
loop.default_exception_handler(context) |
|
|
|
|
|
|
|
server = BlockServer(Env()) |
|
|
|
future = asyncio.ensure_future(server.main_loop()) |
|
|
|