When the gateway gets unknown client publish, it still doesn't send a DISCONNECT:
***************************************************************************
* MQTT-SN Transparent Gateway
* Part of Project Paho in Eclipse
* (http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt-sn.embedded-c.git/)
*
* Author : Tomoaki YAMAGUCHI
* Version: 0.8.0
***************************************************************************
20161004 135202.607 PahoGateway-01 has been started.
ConfigFile: ./gateway.conf
SensorN/W: API mode 1, Baudrate 9600, SerialDevice /dev/ttyUSB1
Broker: localhost : 1883, 8883
RootCApath: (null)
RootCAfile: (null)
ClientCerts: (null)
20161004 135203.304 PUBLISH 0000 <--- Non Active Client ! 0C 00 00 02 00 00 38
20161004 135218.302 PUBLISH 0000 <--- Non Active Client ! 0C 00 00 02 00 00 39
20161004 135233.298 PUBLISH 0000 <--- Non Active Client ! 0C 00 00 02 00 00 30
20161004 135248.293 PUBLISH 0000 <--- Non Active Client ! 0C 00 00 02 00 00 31
This happens when you cycle the gateway with a client connected. Unless the client tries a PING or a >QoS0 publish, it will never figure out it is disconnected. I think the gateway should send back a DISCONNECT in this circumstance, as it is essentially the only way to recover.