sockjs / sockjs-protocol

An attempt to define SockJS protocol
http://sockjs.org
203 stars 29 forks source link

Introduce 0.25 sec delay for concurrent poll requests #65

Closed rstoyanchev closed 11 years ago

rstoyanchev commented 11 years ago

On Java Servlet containers, requests are processed in concurrent threads and it's not possible to guarantee the order of processing. This change introduces a 0.25 sec delay between requests when testing simultaneous polling requests to maximize the chance of the first request to be processed first.

majek commented 11 years ago

Introducing sleep() never solves the underlying problem, but okay. We can live with that.

rstoyanchev commented 11 years ago

Another option would be to send the first POST to something like '/delayed_echo' but that would require existing servers to make a change to pass the test.