Details
Description
The response to a /meta/subscribe message is delayed in case a /meta/reconnect response is currently pending.
If no /meta/reconnect response is pending, the /meta/subscribe is returned immediately.
The delay only happens with the JSONP transport but debugging through the code I can't see any reason for that delay.
The transport.complete method is called at the end of the /meta/subscribe request and even an explicit _out.flush() is executed there.
However the response is only returned at the same time the /reconnect times out.
Same is true for for unsubscribe and I haven't tested publish yet.
After further investigation I found out, that jetty isn't the source of the problem, but firefox (haven' tried IE so far).
The /meta/subscribe is properly returned to the browser but is not executed as long as the /meta/reconnect connection is still open.
That means it is not a jetty bug but still a very tough one for the JSONP stuff in comet. Jetty could workaround by resuming the reconnect continuation with every client message to
make sure that the browser handles all return messages. Anyway I go and ask on the comet mailinglist for some advice.