chore: PacketDistributorService disposable
This commit is contained in:
parent
81646f4501
commit
1cdff7f0be
1 changed files with 7 additions and 1 deletions
|
@ -23,7 +23,7 @@ namespace Server.Services;
|
||||||
using static CodeGenerator;
|
using static CodeGenerator;
|
||||||
using static ExpressionBuilder;
|
using static ExpressionBuilder;
|
||||||
|
|
||||||
public class PacketDistributorService : IHostedService
|
public class PacketDistributorService : IHostedService, IDisposable
|
||||||
{
|
{
|
||||||
private readonly ConcurrentQueue<RawPacket> _concurrentQueue;
|
private readonly ConcurrentQueue<RawPacket> _concurrentQueue;
|
||||||
|
|
||||||
|
@ -178,4 +178,10 @@ public class PacketDistributorService : IHostedService
|
||||||
_logger.PacketData(JsonConvert.SerializeObject(packet));
|
_logger.PacketData(JsonConvert.SerializeObject(packet));
|
||||||
_logger.PacketFinished(item.Session.Id, item.OperationCode);
|
_logger.PacketFinished(item.Session.Id, item.OperationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
_activitySource.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue