Closed minhiclick closed 7 months ago
Task.Run should always return a Task to be awaited. Can you provide more info as to what you're running this on, etc.?
The problem happens sometimes (maybe when too many people are streaming on TikTok). For example right now. With the nickname: moment.house. Live link: @.***/live.
On Sat, Aug 12, 2023 at 5:38 PM Frank van Hoof @.***> wrote:
Task.Run should always return a Task to be awaited. Can you provide more info as to what you're running this on, etc.?
— Reply to this email directly, view it on GitHub https://github.com/frankvHoof93/TikTokLiveSharp/issues/26#issuecomment-1675841187, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALETNQZIGU465UTOTYL7TBTXU5MKXANCNFSM6AAAAAA3NYQHCA . You are receiving this because you authored the thread.Message ID: @.***>
-- Ngô Hoàng Minh Quản lý iClick
Task.Run should always return a Task to be awaited. Can you provide more info as to what you're running this on, etc.?
I'm sorry. I pointed wrong line.
the same problem.
Any other logs or exceptions aside from this nullref? Start() should be starting both the running- & pollingTasks. Unless some other error is preventing the lib from starting?
Please let me know if the issue persists in V1.0.0.
Closed for inactivity
public void Run(CancellationToken? cancellationToken = null, Action onConnectException = null, bool retryConnection = false)
{
token = cancellationToken ?? new CancellationToken();
token.ThrowIfCancellationRequested();
if (ShouldLog(LogLevel.Information))
Debug.Log("Starting Threads");
var run = Task.Run(() => Start(token, null, retryConnection), token);
run.Wait();
runningTask.Wait(); <--- System.NullReferenceException: 'Object reference not set to an instance of an object.'
pollingTask.Wait();
}