del[net]: unnecessary if statement

This commit is contained in:
godotg committed 2025-01-05 20:12:06 +08:00
1 parent 2df0c28af6
commit 1591543cce
1 file changed
-5
@@ -159,11 +159,6 @@ public class PacketService implements IPacketService {
@Override
public void write(ByteBuf buffer, Object packet, Object attachment) {
if (packet == null) {
logger.error("packet is null and can not be sent.");
return;
}
try {
// 预留写入包的长度,一个int字节大小
buffer.ensureWritable(7);