Export to GitHub

socketio-java - issue #3

Message batching on Firefox


Posted on Dec 6, 2010 by Swift Panda

I'm using socketio-java--20101204, Firefox 3.6.12 and Chrome 8.0.552.215

The client sends the server a "test" message. In response to that message the server does the following.

for (int i = 0; i < 10; i++) { outbound.sendMessage( SocketIOFrame.JSON_MESSAGE_TYPE, JSON.toString(Util.map("say", "Hi " + i))); }

Sometimes all ten msgs make it to the client. Most of the time though, only 2 messages are sent to the client and the rest aren't sent until the client sends a PING.

The long-polling GET request (http://127.0.0.1:8080/socket.io/xhr-multipart/)

never disconnects or shows any issue.

I added timestamps to the existing server-side logging and this snippet shows what I'm talking about.

http://paste.pocoo.org/show/301364/

The first 2 lines show 2 messages being sent back to the client, followed by a 15 second delay, a client PING, and then the rest of the data being sent to the client.

I'm not able to cause the same problem using the websocket transport in Chrome.

Comment #1

Posted on Dec 8, 2010 by Grumpy Rhino

(No comment was entered for this change.)

Comment #2

Posted on Jan 15, 2011 by Grumpy Rhino

This issue "should" be fixed by commit "27:cd02572742a3".

Status: Accepted

Labels:
Type-Defect Priority-Medium