stompgem/stomp — pull request #45 by JGailor (2012-06-18 19:48:52+00:00)
Title: Explicitly flushing the connection to prevent last message chunk from not being sent

Had an issue where sending even a small volume of messages would result in occasionally losing last chunk of the message being sent from the stomp client to the ActiveMQ server (explicitly last chunk of XML string was not sent, resulting in malformed XML). Ran tests with 25k messages and was able to reproduce the issue. Adding explicit flush call to the socket solved the problem over the same 25k messages.