refine exiting
This commit is contained in:
parent
7a1647278f
commit
5e19fdc66b
2 changed files with 9 additions and 7 deletions
|
@ -54,7 +54,8 @@ def main():
|
|||
tcprelay.TCPRelay(config, True).start()
|
||||
while sys.stdin.read():
|
||||
pass
|
||||
except KeyboardInterrupt:
|
||||
except (KeyboardInterrupt, IOError, OSError) as e:
|
||||
logging.error(e)
|
||||
os._exit(0)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue