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

Experimental buffer flushing after session was closed

Open mrjoes opened this issue 13 years ago • 3 comments

Few notes:

  1. Not sure if it should check response_pid from the state.
  2. I tried it locally with different transports - appears to be working

mrjoes avatar Oct 10 '12 14:10 mrjoes

Hi @mrjoes - can you explain the rationale behind this patch for me please? I'm happy to do the QA and merge, but I need to properly understand the intent first.

hyperthunk avatar May 14 '13 07:05 hyperthunk

Sure. For polling transports, when server closes connection, there might be something left in the outgoing queue. However, when client comes back to get more data, server sees that session was closed and will deny the request without flushing the queue.

So, it is not working according to websocket spec.

mrjoes avatar May 14 '13 07:05 mrjoes

Right, that makes sense. Let me read through the spec and spend a but of time looking over the code. Hopefully I'll be able to answer (1) and we can get it merged.

hyperthunk avatar May 14 '13 12:05 hyperthunk