From af943b7502f91aaa61a08f4df1c09fbe5f747702 Mon Sep 17 00:00:00 2001 From: Jestan Nirojan Date: Fri, 10 Feb 2012 23:33:59 +0530 Subject: [PATCH] fixed sctp write buffer watermark count --- .../src/main/java/io/netty/channel/sctp/SctpChannelImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport-sctp/src/main/java/io/netty/channel/sctp/SctpChannelImpl.java b/transport-sctp/src/main/java/io/netty/channel/sctp/SctpChannelImpl.java index a73e42c4a6..7e6498b231 100644 --- a/transport-sctp/src/main/java/io/netty/channel/sctp/SctpChannelImpl.java +++ b/transport-sctp/src/main/java/io/netty/channel/sctp/SctpChannelImpl.java @@ -297,8 +297,8 @@ class SctpChannelImpl extends AbstractChannel implements SctpChannel { private int getMessageSize(MessageEvent e) { Object m = e.getMessage(); - if (m instanceof ChannelBuffer) { - return ((ChannelBuffer) m).readableBytes(); + if (m instanceof SctpPayload) { + return ((SctpPayload) m).getPayloadBuffer().readableBytes(); } return 0; }