Log and exit gracefully ILS re-init failure in mux handler
authorBill Erickson <berick@esilibrary.com>
Tue, 8 Oct 2013 20:01:27 +0000 (16:01 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 8 Oct 2013 20:01:27 +0000 (16:01 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
SIPServer.pm

index d41c09c..20656f5 100644 (file)
@@ -272,6 +272,11 @@ sub mux_input {
         # build the connection we deleted after logging in
         $self->{ils} = $active_connections{$conn_id}->{ils}->new($self->{institution}, $self->{account});
 
+        if (!$self->{ils}) {
+            syslog('LOG_ERR', "Unable to build ILS module in mux child");
+            exit(0);
+        }
+
         # build the connection we deleted after logging in
         my $input = Sip::read_SIP_packet($str_fh);
         $input =~ s/[\r\n]+$//sm;    # Strip off any trailing line ends