Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Jetty web sockets drops messages?


Here's a strange behavior I'm looking at: Sending more than 3 quick consecutive messages to a WebSocketServlet fails silently, it looks as if the messages are dropped. The 4th and onward messages never seem to reach the web socket. This can be reproduced consistently on my environment.

I'm attaching a unit test case which demonstrates the problem. Playing around, it seems that it is the SelectChannelConnector that somehow screws it up, using the old SocketConnector works. It also appears to be a timing-realted issue, adding a Thread.sleep(X) between the messages makes it work.

The attached Maven project uses the Weberknecht client libraries to connect to the server. Those aren't in any repository as far as I know, but you can download them here: My appologies for the inconvenience.

I assume this can be related to:

My environment is:

Linux 2.6 x86_64 (Mandriva)
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

Also attached is a thread dump when the test was waiting for messages to echo back. It looks normal to my eyes, but I'm no Jetty expert.

What do you guys think?

/Lars J. Nilsson

Description: Zip archive

Description: Zip archive

Back to the top