public void run() {
if (prodcuer.targets().isEmpty()) {
complete_close.run();
} else {
Delivery delivery = new Delivery();
delivery.message_$eq(new RawMessage(connect_message.willMessage()));
delivery.size_$eq(connect_message.willMessage().length);
delivery.persistent_$eq(connect_message.willQos().ordinal() > 0);
if (connect_message.willRetain()) {
if (delivery.size() == 0) {
delivery.retain_$eq(RetainRemove$.MODULE$);