File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,8 @@ class messaget
209209
210210 mstreamt &operator << (const xmlt &data)
211211 {
212- *this << eom; // force end of previous message
212+ if (this ->tellp () > 0 )
213+ *this << eom; // force end of previous message
213214 if (message.message_handler )
214215 {
215216 message.message_handler ->print (message_level, data);
@@ -219,7 +220,8 @@ class messaget
219220
220221 mstreamt &operator << (const json_objectt &data)
221222 {
222- *this << eom; // force end of previous message
223+ if (this ->tellp () > 0 )
224+ *this << eom; // force end of previous message
223225 if (message.message_handler )
224226 {
225227 message.message_handler ->print (message_level, data);
@@ -243,7 +245,8 @@ class messaget
243245 // / Returns a reference to the top-level JSON array stream
244246 json_stream_arrayt &json_stream ()
245247 {
246- *this << eom; // force end of previous message
248+ if (this ->tellp () > 0 )
249+ *this << eom; // force end of previous message
247250 return message.message_handler ->get_json_stream ();
248251 }
249252
You can’t perform that action at this time.
0 commit comments