avoid adding empty message buffer
@@ -1570,12 +1570,14 @@ qd_message_t *qd_message_receive(pn_delivery_t *delivery)
// Return the message so that the caller can start sending out whatever we have received so far
//
// push what we do have for testing/processing
+ if (qd_buffer_size(content->pending) > 0) {
LOCK(content->lock);
qd_buffer_set_fanout(content->pending, content->fanout);
DEQ_INSERT_TAIL(content->buffers, content->pending);
content->pending = 0;
UNLOCK(content->lock);
content->pending = qd_buffer();
+ }
break;
}
}
