summaryrefslogtreecommitdiffstats
path: root/src/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c
index 75fc89560c..f8a8194374 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -3997,6 +3997,11 @@ channel_read_json_block(
if (channel_parse_messages())
continue;
+ // channel_parse_messages() may fill the queue with new data to
+ // process.
+ if (channel_has_readahead(channel, part))
+ continue;
+
// Wait for up to the timeout. If there was an incomplete message
// use the deadline for that.
timeout = timeout_arg;