nDPIsrvd.py: Throw SocketTimeout Exception to catch both timeout exceptions different Python versions can throw.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2022-06-07 17:59:47 +02:00
parent 4fde63b5c2
commit 77a87254b6
3 changed files with 13 additions and 1 deletions

View File

@@ -439,7 +439,7 @@ if __name__ == '__main__':
except KeyboardInterrupt:
print('\n\nKeyboard Interrupt: cleaned up {} flows.'.format(len(nsock.shutdown())))
break
except TimeoutError:
except nDPIsrvd.SocketTimeout:
stats.updateSpinner()
stats.resetStatus()
stats.printStatus()