newbie - multiple client issue
Vijay K Pandey
VPandey at mdes.ms.gov
Fri Apr 23 14:59:16 EDT 2010
Hi,
I just started digging into Netty for our big client server application. I have written sample server and client classes and trying to test multiple clients.
First Scenario:
The first client connect and write is all good, but as soon as I do a write on the second client(first client channel is still open) - server throws an error as below.
Second Scenario:
The first client connect and write is all good then I disconnect the client. Client JVM exits. Again start the client and do the same connect and write. On write it gives the same exception:
Apr 23, 2010 1:48:03 PM org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink
WARNING: Failed to initialize an accepted socket.
java.lang.IllegalStateException: attached already
at org.jboss.netty.channel.DefaultChannelPipeline.attach(DefaultChannelPipeline.java:79)
at org.jboss.netty.channel.AbstractChannel.<init>(AbstractChannel.java:94)
at org.jboss.netty.channel.socket.nio.NioSocketChannel.<init>(NioSocketChannel.java:72)
at org.jboss.netty.channel.socket.nio.NioAcceptedSocketChannel.<init>(NioAcceptedSocketChannel.java:44)
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.registerAcceptedChannel(NioServerSocketPipelineSink.java:263)
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.run(NioServerSocketPipelineSink.java:229)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
I guess I must be doing something very silly, can someone point me in the right direction.
Vijay
More information about the netty-users
mailing list