--- DBI.pm.orig	Tue Aug  9 13:48:00 2005
+++ DBI.pm	Tue Aug  9 14:53:10 2005
@@ -131,9 +131,11 @@
     $PingTimeOut{$dsn}  = 0 unless $PingTimeOut{$dsn};
     $LastPingTime{$dsn} = 0 unless $LastPingTime{$dsn};
     my $now = time;
-    my $needping = (($PingTimeOut{$dsn} == 0 or $PingTimeOut{$dsn} > 0)
-		    and (($now - $LastPingTime{$dsn}) >= $PingTimeOut{$dsn})
-		   ) ? 1 : 0;
+    # Must ping if TimeOut = 0 else base on time
+    my $needping = ($PingTimeOut{$dsn} == 0 or
+                    ($PingTimeOut{$dsn} > 0 and
+                     $now - $LastPingTime{$dsn} > $PingTimeOut{$dsn})
+                   ) ? 1 : 0;
     print STDERR "$prefix need ping: ", $needping == 1 ? "yes" : "no", "\n" if $Apache::DBI::DEBUG > 1;
     $LastPingTime{$dsn} = $now;
 
