def on_open(self):
if self.ws.protocol is None or (
GRAPHQL_SUBSCRIPTIONS not in self.ws.protocol):
self.ws.close(1002)
def keep_alive_callback():
if not self.ws.closed:
self.send_keep_alive()
else:
gevent.kill(keep_alive_timer)
if self.keep_alive:
keep_alive_timer = gevent.spawn(self.timer, keep_alive_callback,
self.keep_alive)
subscription_transport_ws.py 文件源码
python
阅读 31
收藏 0
点赞 0
评论 0
评论列表
文章目录