… | |
… | |
1714 | my ($ns, $msg) = @_; |
1714 | my ($ns, $msg) = @_; |
1715 | |
1715 | |
1716 | # this weird shuffling is so that direct followup queries |
1716 | # this weird shuffling is so that direct followup queries |
1717 | # get handled first |
1717 | # get handled first |
1718 | my $queue = delete $ns->{query_queue} |
1718 | my $queue = delete $ns->{query_queue} |
1719 | or return; # be conservative, not sure how that cna happen, but we saw a crash here |
1719 | or return; # be conservative, not sure how that can happen, but we saw a crash here |
1720 | |
1720 | |
1721 | (shift @$queue)->[1]->($msg); |
1721 | (shift @$queue)->[1]->($msg); |
1722 | |
1722 | |
1723 | push @{ $ns->{query_queue} }, @$queue; |
1723 | push @{ $ns->{query_queue} }, @$queue; |
1724 | |
1724 | |