Merge with rc

This commit is contained in:
Igor Kulikov 2025-07-24 12:57:02 +03:00
commit 82fe6a0d18
2 changed files with 2 additions and 3 deletions

View File

@ -462,19 +462,18 @@ final class MqttClientImpl implements MqttClient {
return;
}
disconnected = true;
log.trace("[{}] Disconnecting from server", channel != null ? channel.id() : "UNKNOWN");
if (this.channel != null) {
MqttMessage message = new MqttMessage(new MqttFixedHeader(MqttMessageType.DISCONNECT, false, MqttQoS.AT_MOST_ONCE, false, 0));
sendAndFlushPacket(message).addListener((ChannelFutureListener) future -> {
future.channel().close();
disconnected = true;
});
eventLoop.schedule(() -> {
if (channel.isOpen()) {
log.trace("[{}] Channel still open after {} second; forcing close now", channel.id(), DISCONNECT_FALLBACK_DELAY_SECS);
this.channel.close();
disconnected = true;
}
}, DISCONNECT_FALLBACK_DELAY_SECS, TimeUnit.SECONDS);
}

View File

@ -92,7 +92,7 @@ buildRpm {
archiveVersion = projectVersion.replace('-', '')
archiveFileName = "${pkgName}.rpm"
requires("java-17")
requires("(java-17 or java-17-headless or jre-17 or jre-17-headless)") // .or() notation does work in RPM plugin
from("${buildDir}/conf") {
include "${pkgName}.conf"