aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-04-23 15:41:24 +0200
committerThomas White <taw@physics.org>2021-04-23 16:29:39 +0200
commit5c27ae1c23c31789612428d7526d315f2747f0d9 (patch)
tree9a9b8203d03fd9653c257c07c8e5fb5383ceb253 /src
parent095cbebaf68cea40a281462ed6c8c55d1833ed59 (diff)
indexamajig: Mercilessly ignore short ZMQ messages
This is a hack to filter out what seems like "keepalive" messages. It's nasty, but better than contaminating the stream with spurious chunks.
Diffstat (limited to 'src')
-rw-r--r--src/im-sandbox.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index 3f689a0d..7760693a 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -436,8 +436,10 @@ static int run_work(const struct index_args *iargs, Stream *st,
} else {
- pargs.zmq_data = im_zmq_fetch(zmqstuff,
- &pargs.zmq_data_size);
+ do {
+ pargs.zmq_data = im_zmq_fetch(zmqstuff,
+ &pargs.zmq_data_size);
+ } while ( pargs.zmq_data_size < 15 );
pargs.filename = strdup("(from ZMQ)");
pargs.event = NULL;
ser = 0; /* FIXME: Serial numbers from ZMQ? */