mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-12 20:16:07 +00:00
chore[tunnel]: enhance the robustness of the code
This commit is contained in:
1 parent
d30d46a105
commit
da315a1818
1 file changed
+5
-1
@@ -92,7 +92,11 @@ public class TunnelServerCodecHandler extends ByteToMessageCodec<TunnelProtocolS
|
||||
}
|
||||
|
||||
var retainedByteBuf = in.readRetainedSlice(length);
|
||||
session.getChannel().writeAndFlush(TunnelProtocolServer2Client.valueOf(sid, uid, retainedByteBuf));
|
||||
try {
|
||||
session.getChannel().writeAndFlush(TunnelProtocolServer2Client.valueOf(sid, uid, retainedByteBuf));
|
||||
} catch (Throwable t) {
|
||||
ReferenceCountUtil.release(retainedByteBuf);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user