Fix buffer flushing. Prevent from forgetting not sent messages.
Merge pull request #39 from smichal/master

Fix buffer flushing. Prevent from forgetting not sent messages. (@smichal)