diff options
author | Thomas White <taw@physics.org> | 2021-04-23 15:41:24 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-04-23 16:29:39 +0200 |
commit | 5c27ae1c23c31789612428d7526d315f2747f0d9 (patch) | |
tree | 9a9b8203d03fd9653c257c07c8e5fb5383ceb253 | |
parent | 095cbebaf68cea40a281462ed6c8c55d1833ed59 (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.
-rw-r--r-- | src/im-sandbox.c | 6 |
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? */ |