fix (probably harmless) "DBD::Pg::db disconnect failed: server closed the connection...
[freeside.git] / FS / bin / freeside-selfservice-xmlrpcd
index a902051..6c75aa8 100755 (executable)
@@ -15,7 +15,7 @@ use constant MAX_PROCESSES => 10;      # Total server process count.
 use constant SERVER_PORT   => 8080;    # Server port.
 use constant TESTING_CHURN => 0;       # Randomly test process respawning.
 
-use POE;                         # Base features.
+use POE 1.2;                     # Base features.
 use POE::Filter::HTTPD;          # For serving HTTP content.
 use POE::Wheel::ReadWrite;       # For socket I/O.
 use POE::Wheel::SocketFactory;   # For serving socket connections.
@@ -24,9 +24,9 @@ use XMLRPC::Transport::HTTP; #SOAP::Transport::HTTP;
 use XMLRPC::Lite; # for XMLRPC::Serializer
 
 use FS::Daemon qw(daemonize1 drop_root logfile daemonize2 );
-use FS::UID qw(adminsuidsetup);
+use FS::UID qw(adminsuidsetup forksuidsetup);
 use FS::Conf;
-use FS::ClientAPI qw( load_clientapi_modules );
+use FS::ClientAPI;
 use FS::ClientAPI_XMLRPC; #FS::SelfService::XMLRPC;
 
 #freeside
@@ -57,8 +57,6 @@ drop_root();
 
 adminsuidsetup($user);
 
-load_clientapi_modules;
-
 logfile("$FREESIDE_LOG/selfservice-xmlrpcd.log");
 
 daemonize2();
@@ -309,12 +307,10 @@ sub client_got_request {
 #expects to be in place.  aka "kid time" in freeside-selfservice-server
 sub freeside_kid_time {
 
-  #if we need a db connection in the parent
+  #we did need a db connection in the parent, so
   ##get new db handle
-  #$FS::UID::dbh->{InactiveDestroy} = 1;
-  #forksuidsetup($user);
-
-  adminsuidsetup($user);
+  $FS::UID::dbh->{InactiveDestroy} = 1;
+  forksuidsetup($user);
 
   #i guess that was it
 }