Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Events stop firing

$
0
0
@MartR

Thanks, I understand perfectly what you were trying to do now.
I have made multiple tests and never got such behavior on my 2 machines. I am not sure what could be causing such behavior on yours.

Could you please update your code and add the following lines:
var fs = Stream.CreateFilteredStream();
fs.JsonObjectReceived += (sender, args) =>
{
    if (!string.IsNullOrWhiteSpace(args.Json))
    {
        Console.WriteLine(args.Json);
    }
};

fs.StreamStopped += (sender, args) =>
{
    var lastException = ExceptionHandler.GetLastException();
    if (lastException != null)
    {
        Console.WriteLine("An error occurred");
        ExceptionHandler.ClearLoggedExceptions();
    }

    Console.WriteLine("Stream Stopped at " + DateTime.Now.ToLongTimeString());
};
Please let me know if an Exception is thrown and which error it was?
If no exception you might receive a Json message from Twitter just before being disconnected. Could you please let me know which message you received if any?

Cheers,
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>