private void HandleGamePacket(Packet message) { _lastPacketReceived = DateTime.UtcNow; Stopwatch sw = Stopwatch.StartNew(); try { // Log.Info($"Got packet: {message}"); _messageDispatcher.HandlePacket(message); } catch (Exception ex) { // if (message.Id == 39) // return; Log.Warn(ex, $"Packet handling error: {message} - {ex.ToString()}"); } finally { sw.Stop(); if (sw.ElapsedMilliseconds > 250) { Log.Warn($"Packet handling took longer than expected! Time elapsed: {sw.ElapsedMilliseconds}ms (Packet={message})"); } } }
public override void HandleCustomPacket(Packet message) { Stopwatch sw = Stopwatch.StartNew(); try { _messageDispatcher.HandlePacket(message); } catch (Exception ex) { Log.Warn(ex, $"Packet handling error: {message}"); } finally { sw.Stop(); if (sw.ElapsedMilliseconds > 250) { Log.Warn($"Packet handling took longer than expected! Time elapsed: {sw.ElapsedMilliseconds}ms (Packet={message})"); } } }
public override void HandleCustomPacket(Packet message) { _messageDispatcher.HandlePacket(message); }