diff --git a/Examplinvi/Program.cs b/Examplinvi/Program.cs index 06e4975b1..f2cfcd4b4 100644 --- a/Examplinvi/Program.cs +++ b/Examplinvi/Program.cs @@ -35,7 +35,7 @@ class Program { static void Main() { - Auth.SetUserCredentials("54aUlLwbmRN7SX3wswMJmqpQG", "Fid46uknw6665bA4NxCiOHPoIUv6KMsaxhul7P4MwHMecIytYw", "1693649419-Ubxt4bKWWGQiRY9Ko4BcvX03EJUm2BPcRbW6pPM", "wLa7UFyp4FEDR2MHPtr6SEy4E3iCBqqlNAXuampl2SXZ7"); + Auth.SetUserCredentials("CONSUMER_KEY", "CONSUMER_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"); TweetinviEvents.QueryBeforeExecute += (sender, args) => { diff --git a/Tweetinvi.WebLogic/TwitterQuery.cs b/Tweetinvi.WebLogic/TwitterQuery.cs index 1e81fdf0d..08a2e60b1 100644 --- a/Tweetinvi.WebLogic/TwitterQuery.cs +++ b/Tweetinvi.WebLogic/TwitterQuery.cs @@ -28,12 +28,18 @@ public TimeSpan Timeout get { return _timeout; } set { - if (value.TotalMilliseconds <= 0) + if ((int)value.TotalMilliseconds == 0) // Default { _timeout = TimeSpan.FromSeconds(10); return; } + if (value.TotalMilliseconds < 0) // Infinite + { + _timeout = TimeSpan.FromMilliseconds(System.Threading.Timeout.Infinite); + return; + } + _timeout = value; } }