From aa367cb2d69e2db46876409bed77250bfc6588bb Mon Sep 17 00:00:00 2001 From: ISHIKAWA Mutsumi Date: Thu, 25 Oct 2012 12:09:15 +0900 Subject: [PATCH] DB auto reconnect --- mubot4fb.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mubot4fb.pl b/mubot4fb.pl index e7f1840..82bfc56 100755 --- a/mubot4fb.pl +++ b/mubot4fb.pl @@ -101,7 +101,7 @@ sub new { sub init { my ($me) = @_; - return $me->{dbh} = DBI->connect('DBI:mysql:'.$me->{cfg}->{database}, $me->{cfg}->{db_user}, $me->{cfg}->{db_pass},{mysql_enable_utf8 => 1}) || die $DBI::errstr; + return $me->{dbh} = DBI->connect('DBI:mysql:'.$me->{cfg}->{database}, $me->{cfg}->{db_user}, $me->{cfg}->{db_pass},{mysql_enable_utf8 => 1, mysql_auto_reconnect => 1}) || die $DBI::errstr; } sub check_dup { -- 2.11.0