OpenHFT/Java-Chronicle — pull request #63 by homolupus (2014-04-23 15:33:28+00:00)
Title: Chronicle TCP Sink/Source re-connection fix

Fixes the issue where Sink that has received partial data into Sink chronicle fails to reconnect to Source due to Source re-sending last index that Sink already has - causing the following failure on the Sink side:

INFO: Lost connection to localhost/127.0.0.1:61111 retrying java.io.StreamCorruptedException: Expected index 36 but got 35

To reproduce the issue:
- Create a Chronicle Source with some data
- Create a Chronicle Sink and allow it to catch-up with Source
- Stop Chronicle Sink
- Start Chronicle Sink (reusing the previously created Chronicle at this stage containing identical data to Source) - failure.

Existing tests pass. Test case not added as it depends on Chronicle to remain in file system over multiple test runs (leading to file system pollution).