Electron suddenly stopped connecting

Thanks for your replies.

So I will use the WITH_ACK flag for my publishes and change the sleep variables to long instead of unsigned long (based on this topic: Electron Deep Sleep and never wake up?)

The docs says for using no flag:

Unless specified otherwise, events sent to the cloud are sent as a reliable message. The Electron waits for acknowledgement from the cloud that the event has been received, resending the event in the background up to 3 times before giving up.

What is the different between this quote (no flag) and WITH_ACK flag? What will happen if I use the WITH_ACK flag and the acknowledge is never received? Will the application delay forever or is there a timeout? I could handle this with the watchdog.

Like you see in my code, I have a delay(10000) after the publishes. It seems that this is too short for receive the default ack (sent without the WITH_ACK flag, see docs) or does the delay block cloud communications?

@noumanh I only have the 2G version of the Electron. So the ublox modem only can GSM/GPRS.