Browse Source

Change assert to allow empty messages to be forwarded downstream

This will allow chain elements such as a defragmenter to buffer fragmented messages in order to forward the whole message once all the fragments are available.
omigamedev 2 years ago
parent
commit
b2029acd71
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/mediahandlerelement.cpp

+ 1 - 1
src/mediahandlerelement.cpp

@@ -127,7 +127,7 @@ MediaHandlerElement::formIncomingControlMessage(message_ptr message,
 ChainedMessagesProduct
 ChainedMessagesProduct
 MediaHandlerElement::formIncomingBinaryMessage(ChainedMessagesProduct messages,
 MediaHandlerElement::formIncomingBinaryMessage(ChainedMessagesProduct messages,
                                                std::function<bool(ChainedOutgoingProduct)> send) {
                                                std::function<bool(ChainedOutgoingProduct)> send) {
-	assert(messages && !messages->empty());
+	assert(messages);
 	auto product = processIncomingBinaryMessage(messages);
 	auto product = processIncomingBinaryMessage(messages);
 	prepareAndSendResponse(product.outgoing, send);
 	prepareAndSendResponse(product.outgoing, send);
 	if (product.incoming) {
 	if (product.incoming) {