Update ManagerConnection.cs

I was getting a PlatformNotSupported exception with .Net Core 3.1 saying "Operation is not supported on this platform". This code change fixes that and maintains functionality.
This commit is contained in:
brook2006 2020-08-25 15:24:24 +01:00 committed by GitHub
parent b9f3ec64d8
commit 26b8e610f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2049,7 +2049,7 @@ namespace AsterNET.Manager
{ {
if (enableEvents && internalEvent != null) if (enableEvents && internalEvent != null)
if (UseASyncEvents) if (UseASyncEvents)
internalEvent.BeginInvoke(this, e, new AsyncCallback(eventComplete), null); Task.Run(() => internalEvent.Invoke(this, e)).ContinueWith(eventComplete);
else else
internalEvent.Invoke(this, e); internalEvent.Invoke(this, e);
} }