fix(network): Adds setting NetState.PacketEncoder only if not null (#460)

This commit is contained in:
Jabin 2021-02-05 12:07:41 +11:00 committed by GitHub
parent 40352cd566
commit 6295699b3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -417,7 +417,7 @@ namespace Server.Network
// Comment out these lines to turn off huffman compression
state.CompressionEnabled = true;
state.PacketEncoder = NetworkCompression.Compress;
state.PacketEncoder ??= NetworkCompression.Compress;
state.SendSupportedFeature();
state.SendCharacterList();