From: NeilBrown Date: Fri, 5 Dec 2014 02:15:02 +0000 (+1100) Subject: gsmd: only sync with modem on resume if connected. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=59d22fecc15f14a9eefb1b3be144d8b98f183ede;p=plato.git gsmd: only sync with modem on resume if connected. Signed-off-by: NeilBrown --- diff --git a/gsm/gsmd2.py b/gsm/gsmd2.py index 2e80926..86c61dd 100644 --- a/gsm/gsmd2.py +++ b/gsm/gsmd2.py @@ -382,9 +382,10 @@ class modem(Engine,AtChannel): log("modem resumes") self.suspended = False #self.reopen() - self.pending_command = self.ignore self.cancel_timeout() - self.atcmd('') + if self.connected: + self.pending_command = self.ignore + self.atcmd('') def close(self): self.disconnect()