What’s up with all the agent (server?) restarts over the past 30 minutes or so? The world appears to have gotten pretty unstable all of a sudden.

Yep, tracking this issue down; our server code hadn’t been updated in almost a month but something obviously tickled a bug (repeatedly).

Following up on a related thread I started a while back (but never reached any resolution on) …

I’ve got some code in my agents to notify me when my devices go online/offline. Though I’m only interested in my devices, I’m also getting notifications when the agent restarts (therefore my observation of all the restarts yesterday) … not what I want, so clearly I’m missing something in my agent code.

Here’s what I’ve got (that I thought would get me past getting notifications with agent restarts) …
if (!device.isconnected()) { device.onconnect(function() { // my notification stuff server.log("device now online"); }); }
I thought the imp would stay ‘connected’ during an agent restart, but this is not happening during the restart … i.e. device.isconnected() == false, so the notification function executes anyway.

Any way for me to do what I’m trying to do here … i.e. just get a notification if my device goes online/offline (primarily due to power cycling on the device side)?

If onconnect() isn’t behaving for you then I’d suggest for now sending a message from the device to the agent in the boot path?

Yea, makes sense … will just go this way as I’ve continued to struggle a bit with onconnect(). Thanks.