diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2020-08-13 10:52:10 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2020-08-13 10:55:04 +0200 |
commit | 68fb4030ee50a25b912a7be701622490312421ca (patch) | |
tree | 4c42412dfa1c01c7f4b03d1bf5758a47305c1d42 /examples/py-flow-info | |
parent | c164c5f92140064d59ca49b38b17ef40b3072d4a (diff) |
flow-info.py, flow-undetected-to-pcap.py: throw socket error runtime exception if disconnect received
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/py-flow-info')
-rwxr-xr-x | examples/py-flow-info/flow-info.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/py-flow-info/flow-info.py b/examples/py-flow-info/flow-info.py index 07fbba651..96f2b0346 100755 --- a/examples/py-flow-info/flow-info.py +++ b/examples/py-flow-info/flow-info.py @@ -23,7 +23,7 @@ class nDPIsrvdSocket: def receive(self): recvd = self.sock.recv(NETWORK_BUFFER_MAX_SIZE - len(self.buffer)) - if recvd == '': + if len(recvd) == 0: raise RuntimeError('socket connection broken') self.buffer += recvd |