Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Oct 19, 2012
1 parent 9754b4d commit 2fb8bd5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ protected Serialization getSerialization(Channel channel) {
protected static void checkPayload(Channel channel, long size) throws IOException {
int payload = Constants.DEFAULT_PAYLOAD;
if (channel != null && channel.getUrl() != null) {
payload = channel.getUrl().getPositiveParameter(Constants.PAYLOAD_KEY, Constants.DEFAULT_PAYLOAD);
payload = channel.getUrl().getParameter(Constants.PAYLOAD_KEY, Constants.DEFAULT_PAYLOAD);
}
if (size > payload) {
if (payload > 0 && size > payload) {
IOException e = new IOException("Data length too large: " + size + ", max payload: " + payload + ", channel: " + channel);
logger.error(e);
throw e;
Expand Down Expand Up @@ -75,4 +75,4 @@ protected boolean isServerSide(Channel channel) {
return !isClientSide(channel);
}

}
}

0 comments on commit 2fb8bd5

Please sign in to comment.