Skip to content

Commit

Permalink
#461 Fixed issue that resulted in streams to not properly set the Twi…
Browse files Browse the repository at this point in the history
…tterQuery timeout to Infinite
  • Loading branch information
linvi committed May 9, 2017
1 parent 6560718 commit 5174916
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Examplinvi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
{
Expand Down
8 changes: 7 additions & 1 deletion Tweetinvi.WebLogic/TwitterQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 5174916

Please sign in to comment.