阳建军 wrote: > Hi, I wirte a Long connection client, it's sample code as: > public void startClient() throws Exception { > NioSocketConnector socketConnector = new NioSocketConnector(); > socketConnector.setHandler(.......); > ......................................................................... > ConnectFuture future = socketConnector.connect(new InetSocketAddress(ip , > port)); > future.awaitUninterruptibly(); > } > > I implement IoHandler interface, in sessionClosed method, I try to > reconnect the server side, it works, but still print "reconnect" > characters, > Looking at your code, this is expected... It's not because the session as been connected that the sessionClosed() method will not execute the rest of its code...
-- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org