thegeez/clj-browserchannel — pull request #4 by vdichev (2012-05-19 07:54:40+00:00)
Title: Session data stored to survive disconnects

The currently assumption in clj-browserchannel is that if a write on the socket is successful, the data is safely transferred and in case of problems, write would throw an error. There are other scenarios, however, where the server doesn't realize until later that the connection is dropped, leading to silent loss of data.

This is exactly the reason why the client sends an acknowledgement of the last received array id, so that the server can back down and resend the missing data. This patch makes use of this id, sent by the client, and stores all data until it has been properly acknowledged.