Skip to content

Commit 75a0f3c

Browse files
LemonBoybrammool
authored andcommitted
patch 8.2.4699: hard to reproduce hang when reading from a channel
Problem: Hard to reproduce hang when reading from a channel. Solution: Check for readahead before starting to wait. (closes #10093, closes #7781, closes #6364)
1 parent aa7d0c2 commit 75a0f3c

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/channel.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3997,6 +3997,11 @@ channel_read_json_block(
39973997
if (channel_parse_messages())
39983998
continue;
39993999

4000+
// channel_parse_messages() may fill the queue with new data to
4001+
// process.
4002+
if (channel_has_readahead(channel, part))
4003+
continue;
4004+
40004005
// Wait for up to the timeout. If there was an incomplete message
40014006
// use the deadline for that.
40024007
timeout = timeout_arg;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ static char *(features[]) =
746746

747747
static int included_patches[] =
748748
{ /* Add new patch number below this line */
749+
/**/
750+
4699,
749751
/**/
750752
4698,
751753
/**/

0 commit comments

Comments
 (0)