diff --git a/Continuity.AuthServer/Consumers/PacketConsumer.cs b/Continuity.AuthServer/Consumers/PacketConsumer.cs index e58f80c..4eb8998 100644 --- a/Continuity.AuthServer/Consumers/PacketConsumer.cs +++ b/Continuity.AuthServer/Consumers/PacketConsumer.cs @@ -10,7 +10,7 @@ using Wonderking.Packets; namespace Continuity.AuthServer.Consumers; [UsedImplicitly] -public class PacketConsumer : IConsumer, IDisposable +public sealed class PacketConsumer : IConsumer, IDisposable { private readonly ActivitySource _activitySource; private readonly PacketDistributorService _distributorService; @@ -21,20 +21,19 @@ public class PacketConsumer : IConsumer, IDisposable _activitySource = new ActivitySource(nameof(PacketConsumer)); } - public Task Consume(ConsumeContext context) + public async Task Consume(ConsumeContext context) { using var activity = _activitySource?.StartActivity("PacketConsumption"); activity?.SetTag("PacketId", context.Message.OperationCode.ToString()); activity?.SetTag("SessionId", context.Message.Session.Id.ToString()); activity?.SetTag("PacketSize", context.Message.MessageBody.Length); - return _distributorService.AddPacketAsync(context.Message.MessageBody, context.Message.OperationCode, + await _distributorService.AddPacketAsync(context.Message.MessageBody, context.Message.OperationCode, context.Message.Session); } public void Dispose() { _activitySource.Dispose(); - GC.SuppressFinalize(this); } }