March 2018
Beginner to intermediate
410 pages
10h 40m
English
If more than a day has passed, and we still do not get data from the sensor, we invalidate the connection, and remove the annotations we have stored for the corresponding roster item:
else if (SecondsSinceLastEvent > 60 * 60 * 24)
{
if (!string.IsNullOrEmpty(this.sensorJid))
{
Item = this.xmppClient[this.sensorJid];
this.sensor = null;
this.sensorJid = null;
if (Item != null)
{
this.xmppClient.UpdateRosterItem(this.sensorJid,
Item.Name, this.RemoveReference(Item.Groups,
"Sensor"));
}
}
Search = true;
}
Read now
Unlock full access