diff --git a/modem.py b/modem.py index 657b20a..6a3545c 100644 --- a/modem.py +++ b/modem.py @@ -19,6 +19,7 @@ def run(self): try: self.modem.connect() except (TimeoutException,IOError) as e: + self.modem.close() exc_type, exc_value, exc_traceback = sys.exc_info() logging.debug(traceback.format_tb(exc_traceback)) time.sleep(10)