This commit is contained in:
clowwindy 2014-09-20 19:11:33 +08:00
parent ab74c010fd
commit f677c8152d
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ def main():
logging.warn('received SIGQUIT, doing graceful shutting down..')
tcp_server.close(next_tick=True)
udp_server.close(next_tick=True)
signal.signal(signal.SIGQUIT, handler)
signal.signal(getattr(signal, 'SIGQUIT', signal.SIGTERM), handler)
loop.run()
except (KeyboardInterrupt, IOError, OSError) as e:
logging.error(e)