[prev in list] [next in list] [prev in thread] [next in thread]
List: mina-dev
Subject: [jira] [Resolved] (DIRMINA-1056) IllegalArgumentException when setting max and minReadBufferSize > 6
From: "Emmanuel Lecharny (JIRA)" <jira () apache ! org>
Date: 2016-11-30 6:27:59
Message-ID: JIRA.13024067.1480424108000.397937.1480487279516 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/DIRMINA-1056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Emmanuel Lecharny resolved DIRMINA-1056.
----------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.17
Patch applied. Many thanks !
> IllegalArgumentException when setting max and minReadBufferSize > 65536 (default)
> ---------------------------------------------------------------------------------
>
> Key: DIRMINA-1056
> URL: https://issues.apache.org/jira/browse/DIRMINA-1056
> Project: MINA
> Issue Type: Bug
> Components: Transport
> Affects Versions: 2.0.9
> Reporter: Spac Valentin
> Priority: Trivial
> Fix For: 2.0.17
>
>
> After setting the max and minReadBufferSize to 256k on the acceptor's session \
> config, the following error is thrown when a client connects: \
> {code:borderStyle=solid}
> java.lang.IllegalArgumentException: minReadBufferSize: 262144 (expected: smaller \
> than 65536) at org.apache.mina.core.session.AbstractIoSessionConfig.setMinReadBufferSize(AbstractIoSessionConfig.java:110)
> at org.apache.mina.core.session.AbstractIoSessionConfig.setAll(AbstractIoSessionConfig.java:60)
> at org.apache.mina.transport.socket.nio.NioSocketSession.<init>(NioSocketSession.java:65)
> at org.apache.mina.transport.socket.nio.NioSocketAcceptor.accept(NioSocketAcceptor.java:200)
> at org.apache.mina.transport.socket.nio.NioSocketAcceptor.accept(NioSocketAcceptor.java:51)
>
> ...
> {code}
> These two lines seems to be the problem
> {code:title=AbstractIoSessionConfig.java}
> setMinReadBufferSize(config.getMinReadBufferSize());
> setMaxReadBufferSize(config.getMaxReadBufferSize());
> {code}
> This is due to the fact that there is a check when setting the minReadBuffer (it \
> should be > than maxReadBufferSize) but the max isn't set yet so it compares it \
> with the default value (64k). Possible fix: just swap the lines, setting the \
> maxReadBufferSize first.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic