ensure to not swallowExceptions (thread safety)

This commit is contained in:
Nicolas Constant 2021-01-30 00:05:52 -05:00
parent 1d5df9a83b
commit 62a88e40c6
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
2 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,6 @@ namespace BirdsiteLive.Twitter
_twitterUserService = twitterUserService;
_logger = logger;
Auth.SetApplicationOnlyCredentials(_settings.ConsumerKey, _settings.ConsumerSecret, true);
ExceptionHandler.SwallowWebExceptions = false;
}
#endregion
@ -43,6 +42,7 @@ namespace BirdsiteLive.Twitter
{
try
{
ExceptionHandler.SwallowWebExceptions = false;
TweetinviConfig.CurrentThreadSettings.TweetMode = TweetMode.Extended;
var tweet = Tweet.GetTweet(statusId);
_statisticsHandler.CalledTweetApi();
@ -58,6 +58,7 @@ namespace BirdsiteLive.Twitter
public ExtractedTweet[] GetTimeline(string username, int nberTweets, long fromTweetId = -1)
{
ExceptionHandler.SwallowWebExceptions = false;
TweetinviConfig.CurrentThreadSettings.TweetMode = TweetMode.Extended;
var tweets = new List<ITweet>();

View File

@ -27,12 +27,13 @@ namespace BirdsiteLive.Twitter
_statisticsHandler = statisticsHandler;
_logger = logger;
Auth.SetApplicationOnlyCredentials(_settings.ConsumerKey, _settings.ConsumerSecret, true);
ExceptionHandler.SwallowWebExceptions = false;
}
#endregion
public TwitterUser GetUser(string username)
{
ExceptionHandler.SwallowWebExceptions = false;
IUser user;
try
{