Hello,
Our client received a EOS before all snapshot data has arrived. Here's a dump on the client side:
U,4,1,ADD|11|26.99|200|19:40:23|308
U,4,1,|12||14000|19:40:28|16
U,4,1,|13||2600|19:40:34|3
U,4,1,|14||10700|19:40:40|16
U,4,1,|15||300|19:40:41|238
U,4,1,|16||1000|19:40:43|147
U,4,1,|17||12600|19:40:56|16
U,4,1,|18||500||8
U,4,1,|0||5200|19:41:02|16
U,4,1,|1||100|19:39:46|238
U,4,1,|2||400|19:39:49|16
U,4,1,|3||12800|19:39:50|
U,4,1,|4||100|19:39:53|3
U,4,1,|5||8200|19:39:58|16
U,4,1,|6||14900|19:40:02|
U,4,1,|7||700|19:40:03|85
U,4,1,|8||100|19:40:06|308
U,4,1,|9|||19:40:12|27
U,4,1,|10||300|19:40:17|238
EOS,4,1 <------------------------- should this be here??
U,4,1,|19||3600|19:40:56|120
U,4,1,|20||300||16
...
On the server side we assure that ItemEventListener.smartEndOfSnapshot is called only when all snapshots has been sent:
sendSnapshot(item, listener, itemHandle);
listener.smartEndOfSnapshot(itemHandle);
sendSnapshot just get the items and calls ItemEventListener.smartUpdate:
for (final HashMap<String, String> linha : linhas) {
final HashMap<String, String> upd = new HashMap<>(linha);
upd.put(DataProvider.KEY_FIELD, pos.toString());
upd.put(DataProvider.COMMAND_FIELD, DataProvider.ADD_COMMAND);
listener.smartUpdate(itemHandle, upd, true);
}
The subscribe mode is COMMAND in our scenario.
Fortunately our client knows how to deal with this but we want to know if it is supposed to work this way.
Thanks.