Make sure we catch UnsupportedOperationException for derived buffers

This commit is contained in:
Norman Maurer 2013-01-03 22:49:54 +01:00
parent 364b7d1430
commit 2f6e17f681

View File

@ -173,7 +173,12 @@ public final class ChannelHandlerUtil {
*/
public static void freeMessage(Object msg) throws Exception {
if (msg instanceof Freeable) {
((Freeable) msg).free();
try {
((Freeable) msg).free();
} catch (UnsupportedOperationException e) {
// This can happen for derived buffers
// TODO: Think about this
}
}
}