def ping(loop, resp, client_guid):
# periodically send ping to the browser. Any message that
# starts with ":" colon ignored by a browser and could be used
# as ping message.
while True:
await asyncio.sleep(15, loop=loop)
current_app.logger.debug('pubsub.ping guid=%s', client_guid)
resp.write(b': ping\r\n\r\n')
# @log_errors
评论列表
文章目录