Client connects to server failed then successful.

Hong Hai ndhonghai at gmail.com
Wed May 12 04:40:38 EDT 2010


Dear all,

    I wrote a simple example Client/Server application which Client will
always try to re-connect to Server if connections is broken. And I saw the
below problem:
      - Step 1: Run Server app to listen on localhost:port5000 -> OK, port
5000 is LISTENING.
      - Step 2: Run Client app and connect to localhost:port 5000 ->
exceptionCaught(): "ConnectException: No further information" then
channelClosed() is called.
      - Step 3: Since connect failed, Client app try to re-connect ->
successful, channelConnected() is called. Port 5000 is ESTABLISHED.
    It's too strange, because sometimes it occurs, sometimes not (connected
immediately).
    Does anyone face this issue and find out the reason? Why Client cannot
connect to Server at first time but later?
    I guess the port is not cleaned completely after each my test running.
Is is correct?

Thanks for any contributions,
Best Regards,
Hai Ngo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-dev/attachments/20100512/b7450ec2/attachment.html 


More information about the netty-dev mailing list