mirror of https://github.com/fail2ban/fail2ban
database: try to fix `out of sequence` error on some old platform / sqlite versions (#2613) - repack iterator as long as in lock (although dirty read has no matter here and only writing operations should be serialized, but to be sure and exclude this as source of that errors).
parent
3befbb1770
commit
cd42cb26d6
|
@ -754,7 +754,8 @@ class Fail2BanDb(object):
|
|||
if overalljails or jail is None:
|
||||
query += " GROUP BY ip ORDER BY timeofban DESC LIMIT 1"
|
||||
cur = self._db.cursor()
|
||||
return cur.execute(query, queryArgs)
|
||||
# repack iterator as long as in lock:
|
||||
return list(cur.execute(query, queryArgs))
|
||||
|
||||
def _getCurrentBans(self, cur, jail = None, ip = None, forbantime=None, fromtime=None):
|
||||
queryArgs = []
|
||||
|
|
Loading…
Reference in New Issue