File tree 1 file changed +6
-3
lines changed 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,8 @@ class messaget
209
209
210
210
mstreamt &operator << (const xmlt &data)
211
211
{
212
- *this << eom; // force end of previous message
212
+ if (this ->tellp () > 0 )
213
+ *this << eom; // force end of previous message
213
214
if (message.message_handler )
214
215
{
215
216
message.message_handler ->print (message_level, data);
@@ -219,7 +220,8 @@ class messaget
219
220
220
221
mstreamt &operator << (const json_objectt &data)
221
222
{
222
- *this << eom; // force end of previous message
223
+ if (this ->tellp () > 0 )
224
+ *this << eom; // force end of previous message
223
225
if (message.message_handler )
224
226
{
225
227
message.message_handler ->print (message_level, data);
@@ -243,7 +245,8 @@ class messaget
243
245
// / Returns a reference to the top-level JSON array stream
244
246
json_stream_arrayt &json_stream ()
245
247
{
246
- *this << eom; // force end of previous message
248
+ if (this ->tellp () > 0 )
249
+ *this << eom; // force end of previous message
247
250
return message.message_handler ->get_json_stream ();
248
251
}
249
252
You can’t perform that action at this time.
0 commit comments