fix(sessds): defend restartable stream iterator from infinite loop
This commit is contained in:
parent
947af1faaf
commit
950f4d9483
|
@ -136,10 +136,13 @@ next_stream(ItStream0 = #iter{limit = N, filter = Filter, it = It0, it_cont = It
|
|||
false ->
|
||||
next_stream(ItStream)
|
||||
end;
|
||||
none ->
|
||||
none when It0 =/= ItCont ->
|
||||
%% Restart the iteration from the beginning:
|
||||
ItStream = ItStream0#iter{it = ItCont},
|
||||
next_stream(ItStream)
|
||||
next_stream(ItStream);
|
||||
none ->
|
||||
%% No point in restarting the iteration, `ItCont` is empty:
|
||||
none
|
||||
end.
|
||||
|
||||
is_fetchable(_Comm1, _Comm2, #srs{it_end = end_of_stream}) ->
|
||||
|
|
Loading…
Reference in New Issue