mirror of https://github.com/jumpserver/jumpserver
fix: 消息订阅redis连接未关闭
parent
ed077910eb
commit
5cfd5afc7c
|
@ -50,6 +50,7 @@ class SiteMsgWebsocket(JsonWebsocketConsumer):
|
|||
|
||||
while not self.disconnected:
|
||||
subscribe = new_site_msg_chan.subscribe()
|
||||
self.subscribe = subscribe
|
||||
for message in subscribe.listen():
|
||||
if message['type'] != 'message':
|
||||
continue
|
||||
|
@ -67,4 +68,5 @@ class SiteMsgWebsocket(JsonWebsocketConsumer):
|
|||
|
||||
def disconnect(self, close_code):
|
||||
self.disconnected = True
|
||||
self.subscribe.close()
|
||||
self.close()
|
||||
|
|
Loading…
Reference in New Issue