Commit 74e8c91e authored by ibuler's avatar ibuler

[Feature] 修改terminate session 功能

parent 7227baa8
......@@ -79,6 +79,11 @@ class Session:
self.sel.unregister(sharer)
self._sharers.remove(sharer)
def terminate(self):
msg = b"Terminate by administrator\r\n"
self.client.send(msg)
self.close()
def bridge(self):
"""
Bridge clients with server
......
......@@ -24,7 +24,7 @@ class TaskHandler:
break
if session:
session.close()
session.terminate()
self.app.service.finish_task(task.id)
def handle(self, task):
......
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