Fix ToCancellationToken linkToken

master
hikari 2020-08-24 17:10:26 +09:00 committed by GitHub
parent 7718d345c8
commit 7432c0073a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ namespace Cysharp.Threading.Tasks
var cts = new CancellationTokenSource(); var cts = new CancellationTokenSource();
ToCancellationTokenCore(task, cts).Forget(); ToCancellationTokenCore(task, cts).Forget();
return CancellationTokenSource.CreateLinkedTokenSource(linkToken).Token; return CancellationTokenSource.CreateLinkedTokenSource(cts.Token, linkToken).Token;
} }
public static CancellationToken ToCancellationToken<T>(this UniTask<T> task) public static CancellationToken ToCancellationToken<T>(this UniTask<T> task)