add connection lost

This commit is contained in:
Benny 2023-12-17 17:24:26 +01:00
parent 1c3becee9d
commit 34a6f9d870
No known key found for this signature in database
GPG key ID: 6CD0DBDA5235D481

View file

@ -182,20 +182,10 @@ class Detector:
logging.critical("Next salt crash: %s", self.func_name())
return True
def msg_id_detector(self):
text = "The msg_id is too low"
def connection_reset_detector(self):
text = "Send exception: ConnectionResetError Connection lost"
if text in self.logs:
logging.critical("msg id crash: %s ", self.func_name())
for item in pathlib.Path(__file__).parent.glob("*.session"):
logging.warning("Removing session file: %s", item)
item.unlink(missing_ok=True)
time.sleep(3)
return True
def sqlite_locked_detector(self):
text = "sqlite3.OperationalError: database is locked"
if text in self.logs:
logging.critical("database is locked: %s ", self.func_name())
logging.critical("connection lost: %s ", self.func_name())
return True