|
@@ -137,7 +137,7 @@ public class MQTT_protocol implements Protocol {
|
|
|
if(dest != null){
|
|
|
returnPackets.add(new MQTT_packet(MQTT_packet.PINGREQ, timestep, port, dest));
|
|
|
if(dest.getStatus()!=Port.CLOSED)
|
|
|
- returnPackets.add(new MQTT_packet(MQTT_packet.PINGREQ, timestep, dest, port));
|
|
|
+ returnPackets.add(new MQTT_packet(MQTT_packet.PINGRESP, timestep, dest, port));
|
|
|
}
|
|
|
}
|
|
|
if(subs.contains(port)||pubSubs.contains(port)){
|
|
@@ -210,7 +210,7 @@ public class MQTT_protocol implements Protocol {
|
|
|
if(Math.random() < 0.05 && port != broker){
|
|
|
returnPackets.add(new MQTT_packet(MQTT_packet.PINGREQ, timestep, port, broker));
|
|
|
if(port.getStatus()!=Port.CLOSED)
|
|
|
- returnPackets.add(new MQTT_packet(MQTT_packet.PINGREQ, timestep, broker, port));
|
|
|
+ returnPackets.add(new MQTT_packet(MQTT_packet.PINGRESP, timestep, broker, port));
|
|
|
}
|
|
|
return returnPackets;
|
|
|
}
|