Commit f8a3846f authored by ibuler's avatar ibuler

[Update] 修复child shutdown可能的bug

parent 17d01a8e
...@@ -263,7 +263,7 @@ class InteractiveServer: ...@@ -263,7 +263,7 @@ class InteractiveServer:
self.display_banner() self.display_banner()
while True: while True:
try: try:
opt = net_input(self.client, prompt='Opt>', before=1) opt = net_input(self.client, prompt='Opt> ', before=1)
rv = self.dispatch(opt) rv = self.dispatch(opt)
if rv is self._sentinel: if rv is self._sentinel:
break break
......
...@@ -264,8 +264,11 @@ class WSProxy: ...@@ -264,8 +264,11 @@ class WSProxy:
def close(self): def close(self):
self.stop_event.set() self.stop_event.set()
self.child.shutdown(1) try:
self.child.close() self.child.shutdown(1)
self.child.close()
except OSError:
pass
logger.debug("Proxy {} closed".format(self)) logger.debug("Proxy {} closed".format(self))
......
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