Merge pull request #43 from simonferquel/deadlock-on-concurrent-rw

Flush outgoing content before sending EOF message