Skip to content

Commit

Permalink
Fix issue with DataContext.WaitForAsync refactor, where token cancela…
Browse files Browse the repository at this point in the history
…tion from WaitFor doesn't cause the TaskCompletionSource from WaitForAsync to get canceled as well
  • Loading branch information
RedFlames committed Aug 21, 2024
1 parent 629a1ce commit d0d9f6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CelesteNet.Shared/DataContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
using Celeste.Mod.CelesteNet.DataTypes;
using MonoMod.Utils;

namespace Celeste.Mod.CelesteNet
{
namespace Celeste.Mod.CelesteNet {
public delegate void DataHandler(CelesteNetConnection con, DataType data);
public delegate void DataHandler<T>(CelesteNetConnection con, T data) where T : DataType<T>;
public delegate bool DataFilter(CelesteNetConnection con, DataType data);
Expand Down Expand Up @@ -266,6 +265,7 @@ void RemoveHandler() {
if (handler != null)
UnregisterHandler(typeof(T), handler);
handler = null;
tcs.TrySetCanceled();
}
}

Expand Down

0 comments on commit d0d9f6a

Please sign in to comment.