-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to connect to a provider that only answers one GetDirectory request per message? #39
Comments
To work around this issue, call a This approach ensures that each consumer message contains at most one GetDirectory request and will thus lead to many more messages being sent by the consumer. Consequentially, the process of retrieving all the elements of interest will take much longer than with a provider that implements the specification correctly. |
It seems as if I am having difficulties wrapping my head around these asynchronous thingies. I tried to implement the suggestion like this:
where RetrieveChildren looks like this:
This, however gives me System.Threading.Tasks.TaskCanceledException in the AsyncPump. Single stepping through the code sometimes lets it traverse the tree further, so I am thinking that I am doing something stupid regarding my async/await bits. I would appreciate an example of how to actually implement the work-around. |
I removed the recursion like this:
Then I get a "System.Threading.Tasks.TaskCancelledException" with the following stack trace:
I apologise for the swedish text in the stack trace, but I hope that you can decipher it anyway. Curiously enough, this happens on the same node as the earlier crash even though I do the traversal in the other direction, meaning that a lot more nodes are traversed before the crash, this time. |
Have you tried to increase the timeout to say 10000? 1000 seems a little low. |
Wouldn't I get timeout exceptions if that was the case? I still get TaskCancelledExceptions, even with much longer time-outs. In addition, my code as it is written now, sometimes simply freezes. There must be something wrong with it. I just can't see what. EDIT: I tested with a time-out of 5 and, yes, I get a timeout exception as I expected. So the TaskCancelled is because of something else. I have a feeling that it has something to do with the scope that creates threads expiring before the threads are completed somehow. But I am not sure. |
You should, but I had the suspicion that there might be a bug that would prevent you from getting a proper
While I can't reproduce the |
Some providers seem to have issues with answering the requests sent by the Ember+ Sharp Library. The library typically sends messages containing many GetDirectory requests, but said providers only ever answer the first one. As a result,
Consumer.CreateAsync
fails with aTimeoutException
.The text was updated successfully, but these errors were encountered: