diff options
Diffstat (limited to 'examples/py-flow-info')
-rwxr-xr-x | examples/py-flow-info/flow-info.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/py-flow-info/flow-info.py b/examples/py-flow-info/flow-info.py index d9354e7ad..b7de8c951 100755 --- a/examples/py-flow-info/flow-info.py +++ b/examples/py-flow-info/flow-info.py @@ -512,6 +512,9 @@ if __name__ == '__main__': while True: try: nsock.loop(onJsonLineRecvd, onFlowCleanup, stats) + except nDPIsrvd.SocketConnectionBroken as err: + sys.stderr.write('\n{}\n'.format(err)) + break except KeyboardInterrupt: print('\n\nKeyboard Interrupt: cleaned up {} flows.'.format(len(nsock.shutdown()))) break |