重构黑名单,修改代码

This commit is contained in:
heavyrain.lee
2019-11-18 14:53:20 +08:00
parent 029b6ed691
commit c1b9a81e12
13 changed files with 85 additions and 24 deletions
@@ -178,7 +178,7 @@ public class Qos1PublishHandler extends QosPublishHandler {
} else {
MemorySessionStore.Session session = m_sessionStore.getSession(clientID);
if (session != null && session.getUsername().equals(fromUser)) {
if (data.length > 7*1024 && session.getMqttVersion() == MqttVersion.Wildfire_1) {
if (data.length > 7*1024 && session.getMqttVersion().protocolLevel() >= MqttVersion.Wildfire_1.protocolLevel()) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
GZIPOutputStream gzip;
try {