NO-JIRA Send MQTT WILL outside of Server Session
This commit is contained in:
parent
06688f5c32
commit
8b51ec27db
|
@ -161,7 +161,12 @@ public class MQTTPublishManager {
|
||||||
|
|
||||||
Transaction tx = session.getServerSession().newTransaction();
|
Transaction tx = session.getServerSession().newTransaction();
|
||||||
try {
|
try {
|
||||||
|
if (internal) {
|
||||||
|
session.getServer().getPostOffice().route(serverMessage, tx, true);
|
||||||
|
} else {
|
||||||
session.getServerSession().send(tx, serverMessage, true, false);
|
session.getServerSession().send(tx, serverMessage, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
if (retain) {
|
if (retain) {
|
||||||
boolean reset = payload instanceof EmptyByteBuf || payload.capacity() == 0;
|
boolean reset = payload instanceof EmptyByteBuf || payload.capacity() == 0;
|
||||||
session.getRetainMessageManager().handleRetainedMessage(serverMessage, topic, reset, tx);
|
session.getRetainMessageManager().handleRetainedMessage(serverMessage, topic, reset, tx);
|
||||||
|
|
Loading…
Reference in New Issue