From 1b757c8f64e346f56dbb1b4ece7a1898dd3fd3d1 Mon Sep 17 00:00:00 2001 From: desaster Date: Wed, 9 Jun 2010 04:46:50 +0000 Subject: [PATCH] Have mysql reconnect if disconnected git-svn-id: https://kippo.googlecode.com/svn/trunk@118 951d7100-d841-11de-b865-b3884708a8e2 --- kippo/dblog/mysql.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kippo/dblog/mysql.py b/kippo/dblog/mysql.py index c0f836d6..0eb5e21b 100644 --- a/kippo/dblog/mysql.py +++ b/kippo/dblog/mysql.py @@ -7,7 +7,8 @@ class DBLogger(dblog.DBLogger): host = cfg.get('database', 'host'), db = cfg.get('database', 'database'), user = cfg.get('database', 'username'), - passwd = cfg.get('database', 'password')) + passwd = cfg.get('database', 'password'), + reconnect = True) def createSession(self, ip): sql = 'INSERT INTO `session` (`starttime`, `sensor`, `ip`)' + \