Lines 673-680
sub Zconn {
Link Here
|
673 |
my $auth=shift; |
673 |
my $auth=shift; |
674 |
my $piggyback=shift; |
674 |
my $piggyback=shift; |
675 |
my $syntax=shift; |
675 |
my $syntax=shift; |
676 |
if ( defined($context->{"Zconn"}->{$server}) && (0 == $context->{"Zconn"}->{$server}->errcode()) ) { |
676 |
if ( defined($context->{"Zconn"}->{$server}->{$async}) && (0 == $context->{"Zconn"}->{$server}->{$async}->errcode()) ) { |
677 |
return $context->{"Zconn"}->{$server}; |
677 |
return $context->{"Zconn"}->{$server}->{$async}; |
678 |
# No connection object or it died. Create one. |
678 |
# No connection object or it died. Create one. |
679 |
}else { |
679 |
}else { |
680 |
# release resources if we're closing a connection and making a new one |
680 |
# release resources if we're closing a connection and making a new one |
Lines 683-694
sub Zconn {
Link Here
|
683 |
# and make a new one, particularly for a batch job. However, at |
683 |
# and make a new one, particularly for a batch job. However, at |
684 |
# first glance it does not look like there's a way to easily check |
684 |
# first glance it does not look like there's a way to easily check |
685 |
# the basic health of a ZOOM::Connection |
685 |
# the basic health of a ZOOM::Connection |
686 |
$context->{"Zconn"}->{$server}->destroy() if defined($context->{"Zconn"}->{$server}); |
686 |
$context->{"Zconn"}->{$server}->{$async}->destroy() if defined($context->{"Zconn"}->{$server}->{$async}); |
687 |
|
687 |
|
688 |
$context->{"Zconn"}->{$server} = &_new_Zconn($server,$async,$auth,$piggyback,$syntax); |
688 |
$context->{"Zconn"}->{$server}->{$async} = &_new_Zconn($server,$async,$auth,$piggyback,$syntax); |
689 |
$context->{ Zconn }->{ $server }->option( |
689 |
$context->{ Zconn }->{ $server }->{$async}->option( |
690 |
preferredRecordSyntax => C4::Context->preference("marcflavour") ); |
690 |
preferredRecordSyntax => C4::Context->preference("marcflavour") ); |
691 |
return $context->{"Zconn"}->{$server}; |
691 |
return $context->{"Zconn"}->{$server}->{$async}; |
692 |
} |
692 |
} |
693 |
} |
693 |
} |
694 |
|
694 |
|
695 |
- |
|
|