sockjs-protocol icon indicating copy to clipboard operation
sockjs-protocol copied to clipboard

Test suite: adding tests for discarding messages on #close in polling transport

Open botanicus opened this issue 13 years ago • 2 comments

There's a significant difference between behaviour of primitive transports such as polling and more advanced transport such as websockets in case of closing connection in user app (see http://pastie.org/pastes/3011573). So whereas websocket tranport do deliver all the messages, primitive transports buffer messages and if user call #close, buffer won't be ever send, hence these messages shall not be delivered.

This behaviour should be tested.

botanicus avatar Dec 13 '11 19:12 botanicus

Also, we should test what happens when one sends a message if the session is in 'closed' state. The message should be discarded, but the 'send' shouldn't raise 404.

majek avatar Dec 13 '11 19:12 majek

Good point.

botanicus avatar Dec 13 '11 20:12 botanicus