Do not make batch if only one msg left
@@ -141,8 +141,11 @@ class Batched(MessageProcessor):
del self.outBoxes[rid]
def _make_batch(self, msgs):
+ if len(msgs) > 1:
batch = Batch(msgs, None)
serialized_batch = self.sign_and_serialize(batch)
+ else:
+ serialized_batch = msgs[0]
return serialized_batch
def _test_batch_len(self, batch_len):
