sockjs/sockjs-node — pull request #117 by glasser (2013-04-06 05:57:32+00:00)
Title: When the server closes a connection, make sure the send buffer still gets flushed.

On polling protocols, you otherwise do not actually get the final output from the server. eg:

*server*
```js
var closer = sockjs.createServer();
closer.on('connection', function(conn) {
conn.write("first message");
conn.close();
});
```

*client*
```js
var sock = new SockJS('http://127.0.0.1:9999/closer', undefined, {
protocols_whitelist: [
'xhr-polling'
]});
sock.onopen = function() {
console.log('open');
};
sock.onmessage = function(e) {
console.log('message', e.data);
};
sock.onclose = function() {
console.log('close');
};
```

Without this patch, the client just logs open and close. With this patch, the client logs the message as well.