Repository navigation
Refactor LongPolling in Java to avoid stackoverflow - #33564
Conversation
| } | ||
| } | ||
| return poll(url); | ||
| receiveLoopSubject.onNext(url); |
There was a problem hiding this comment.
Does BehaviorSubject prevent the subscribers from running inline in this case?
There was a problem hiding this comment.
No, onNext still runs inline, the stackoverflow was from the error handler. Before we were returning new completables per poll which would extend the overall subscribe from poll(url).subscribeWith(receiveLoop);. But now we only subscribe to the BehaviorSubject.onError(...) so there wont be a continuous onError subscription from new completables.
There was a problem hiding this comment.
I think we should dispatch this then. While it seems unlikely that polls would always complete inline, it's doesn't seem impossible.
There was a problem hiding this comment.
I think in this case it will always be dispatched because of OkHttp, but I will look into doing the dispatching ourselves
* main: Handle more cases with the new entry point pattern (dotnet#33500) [main] Update dependencies from dotnet/runtime dotnet/efcore (dotnet#33560) Refactor LongPolling in Java to avoid stackoverflow (dotnet#33564) Optimize QueryCollection (dotnet#32829) Switch to in-org action (dotnet#33610) Improve Codespaces + C# extension interaction (dotnet#33614)


Fixes #29477
Switch from recursion to
subject.onNext()for re-polling.