diff --git a/shodan/stream.py b/shodan/stream.py index 77ade7d..eac345f 100644 --- a/shodan/stream.py +++ b/shodan/stream.py @@ -27,7 +27,7 @@ def _create_stream(self, name, query=None, timeout=None): # If the user requested a timeout then we need to disable heartbeat messages # which are intended to keep stream connections alive even if there isn't any data # flowing through. - if timeout is not None: + if timeout: params['heartbeat'] = False if query is not None: