Aug 2, 2013 at 3:19 PM
Edited Aug 2, 2013 at 3:24 PM
Great product, really appreciate your quick responses to users and the time you've spent on this code.
The goal for me is to have the streaming API to be constantly running without my interaction. If an exception occurs that breaks the process, I'd like it to reconnect and continue.
I have a problem with exception handling for the streaming API. How do I catch exceptions while using the streaming API?
Right now, I'm having two different unhandled WebExceptions being thrown:
- The request was aborted: Could not create SSL/TLS secure channel
- Something along the lines of the connection being closed
These exceptions are thrown randomly during runtime between a few minutes and several hours.
It's definitely happening behind the scenes since I have a try catch enclosing my StreamingCallback lambda expression that isn't hit. Because it's in your code on a separate thread, the only way I really know how to catch it is to register an UnhandledExceptionEventHandler.
However, that really isn't the solution I need considering how I can't stop the application from crashing when it reaches that point.
P.S. For what it's worth, I have this process working on it's own thread. Shouldn't make a difference, but I figured I'd mention it.