Author: perrin Date: Fri Jun 7 13:41:23 2013 New Revision: 1490646 URL: http://svn.apache.org/r1490646 Log: Fix detection of server startup to avoid caching connections in the parent process
Modified: perl/Apache-DBI/trunk/lib/Apache/DBI.pm Modified: perl/Apache-DBI/trunk/lib/Apache/DBI.pm URL: http://svn.apache.org/viewvc/perl/Apache-DBI/trunk/lib/Apache/DBI.pm?rev=1490646&r1=1490645&r2=1490646&view=diff ============================================================================== --- perl/Apache-DBI/trunk/lib/Apache/DBI.pm (original) +++ perl/Apache-DBI/trunk/lib/Apache/DBI.pm Fri Jun 7 13:41:23 2013 @@ -124,8 +124,10 @@ sub connect { # unpredictable query results. # See: http://perl.apache.org/docs/2.0/user/porting/compat.html#C__Apache__Server__Starting__and_C__Apache__Server__ReStarting_ if (MP2) { - require Apache2::ServerUtil; - if (Apache2::ServerUtil::restart_count() == 1) { + require ModPerl::Util; + my $callback = ModPerl::Util::current_callback(); + if ($callback !~ m/Handler$/ or + $callback =~ m/(PostConfig|OpenLogs)/) { debug(2, "$prefix skipping connection during server startup, read the docu !!"); return $drh->connect(@args); }