From e1b7c7a59bd188ea9b2b995a09203e009e64844a Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 4 Sep 2014 15:49:26 -0700 Subject: [PATCH] Fix for reading an empty string from the zmq firehose --- emdn/firehose.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emdn/firehose.py b/emdn/firehose.py index 1a1a4b5d..8b0d208f 100644 --- a/emdn/firehose.py +++ b/emdn/firehose.py @@ -72,7 +72,9 @@ def _read(): def _poll(timeout): return self.__socket.poll(timeout) def _read(): - return self.__socket.recv_string() + result = self.__socket.recv_string() + if not result: raise EOFError() + return result # All ZMQ operations are done through a Context, # so use one we're given or create one for ourselves.