[
https://issues.apache.org/jira/browse/DIRMINA-732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Lecharny reopened DIRMINA-732:
---------------------------------------
It's totally fucked up.
The fix is OK, but it's a hack.
The real issue is that when we create a socket using
InetSocketAddress bindAddress = new
InetSocketAddress(AvailablePortFinder.getNextAvailable()),
it creates an IPV4 address (/0.0.0.0:XXXX). Then we create the acceptor, and
bind this address on it.
The code for acceptor.bind(SocketAddress localAddress) is doing :
DatagramChannel c = DatagramChannel.open();
...
c.configureBlocking(false);
c.socket.bind(localAddress); // Here, localAddress value is /0.0.0.0:XXXX
// and here, c.localAddress value is an IPV6 address : /0:0:0:0:0:0:0:0:XXXX
Why not ...
*but*, when we do :
IoSession session = acceptor.newSession(new InetSocketAddress(
"127.0.0.1", AvailablePortFinder.getNextAvailable()),
bindAddress);
on the client, the bindAddress is an IPV4 address. As we have registered an
IpV6 @ in the boundHandles Map, with the SocketAddress as a key, we *never*
find back the bindAddress, as it's a IPV4 SocketAddress.
We have to find a way to use a key which is not IPV4/IPV6 sensible ...
> Session Idle events never comes in sessions managed by NioDatagramAcceptor
> --------------------------------------------------------------------------
>
> Key: DIRMINA-732
> URL: https://issues.apache.org/jira/browse/DIRMINA-732
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.0-M6
> Environment: Any
> Reporter: Mykhailo Tiutin
> Priority: Minor
> Fix For: 2.0.0-RC2
>
> Attachments: DatagramSessionIdleTest.java,
> DatagramSessionIdleTimePatch
>
>
> Idle events never appears in sessions managed by NioDatagramAcceptor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.