Le 10/7/12 2:19 PM, [email protected] a écrit :
Hello.
I'm attempting to write a tiny example server based on MemoryMonitor, but for
some reason, the server doesn't produce any output. The original MemoryMonitor
server does work correctly, so presumably there's something subtly wrong with
my program.
Your code is correct, and, yes, there is something subtile that make
your code not working.
You have to add :
future.awaitUninterruptibly();
just after this line in your UDPClient :
final ConnectFuture future =
this.connector.connect(new InetSocketAddress("127.0.0.1", 2300));
Yes, I know, it sounds *weirdo*. I have no idea why the
if (conn_future.isConnected()) {
does not wait for the same kind of event than the await() method does.
I suggest you fill a JIRA, so that we can fix this strange behavior
Thanks for the test case, btw !
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com