rt 4.0.23
[freeside.git] / rt / sbin / rt-server.in
index 632ba0b..8caefdb 100644 (file)
@@ -3,7 +3,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -127,7 +127,7 @@ EOF
 
     RT->InstallMode(1);
 } else {
-    RT->Init();
+    RT->Init( Heavy => 1 );
 
     my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'post');
     unless ( $status ) {
@@ -138,6 +138,7 @@ EOF
 
 # we must disconnect DB before fork
 if ($RT::Handle) {
+    $RT::Handle->dbh->disconnect if $RT::Handle->dbh;
     $RT::Handle->dbh(undef);
     undef $RT::Handle;
 }