UnitSeven
UnitSeven
CC#
Created by UnitSeven on 12/1/2024 in #help
(Solved) IHttpClientFactory problem with requests
i think i solved this... i will rearage code and post what i did...
8 replies
CC#
Created by UnitSeven on 12/1/2024 in #help
(Solved) IHttpClientFactory problem with requests
well... for beginning there was not setting timeout... so it was by default 100 seconds... later i set it to 20 seconds... that i dont need to wait too long for error 🙂 And i'm query Discord... so i think it can handle 5 instant requests... all so i tried from other servers... result same... 2 pass.. other hangs...
8 replies
CC#
Created by UnitSeven on 12/1/2024 in #help
(Solved) IHttpClientFactory problem with requests
That's console output... 5 tast are fired from: var result = await System.Threading.Tasks.Task.WhenAll(xTasksToExecute); and 2 of them completed... URL's i think good... if i use Task XTAtachmetToFileAttachment(xOCollectedAttachment) in foreach loop... all is OK. But when i try parallel... its not completing...
8 replies
CC#
Created by UnitSeven on 12/1/2024 in #help
(Solved) IHttpClientFactory problem with requests
well... i addted console line at the Task beginning and end.. and i get like this Befor caling WhenAll. XTAtachmetToFileAttachment Task running. XTAtachmetToFileAttachment Task running. XTAtachmetToFileAttachment Task running. XTAtachmetToFileAttachment Task running. XTAtachmetToFileAttachment Task running. XTAtachmetToFileAttachment Task completed. XTAtachmetToFileAttachment Task completed. after i get errors huge stack.. something like: System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Bot_One.XNUtilites.XCSendMsessages.<XTAtachmetToFileAttachment>d__1.MoveNext() in D:\CModules\Bot One\Bot One\XNUtilites\XCSendMsessages.cs:line 161 System.Threading.Tasks.TaskCanceledException: A task was canceled. at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Bot_One.XNUtilites.XCSendMsessages.<XTAtachmetToFileAttachment>d__1.MoveNext() in D:\CModules\Bot One\Bot One\XNUtilites\XCSendMsessages.cs:line 161
8 replies