diff --git a/Server/Services/PacketDistributorService.cs b/Server/Services/PacketDistributorService.cs index 93cf24c..54c42fc 100644 --- a/Server/Services/PacketDistributorService.cs +++ b/Server/Services/PacketDistributorService.cs @@ -1,10 +1,7 @@ namespace Server.Services; using System.Collections.Concurrent; -using System.Linq.Expressions; using System.Reflection; -using DotNext; -using DotNext.Metaprogramming; using MassTransit.Internals; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -114,7 +111,7 @@ public class PacketDistributorService : IHostedService { if (this.concurrentQueue.TryDequeue(out var item)) { - Task.Run(() => this.InvokePacketHandler(item)); + ThreadPool.QueueUserWorkItem(this.InvokePacketHandler, item, true); } else {