in reply to Re^2: IO Socket buffer flushing
in thread IO Socket buffer flushing

I am also encountering the issue where two successive writes are picked up by second read.

Not surprisingly, the same answer applies to you.