Lines 693-700
sub Zconn {
Link Here
|
693 |
my $auth=shift; |
693 |
my $auth=shift; |
694 |
my $piggyback=shift; |
694 |
my $piggyback=shift; |
695 |
my $syntax=shift; |
695 |
my $syntax=shift; |
696 |
if ( defined($context->{"Zconn"}->{$server}) && (0 == $context->{"Zconn"}->{$server}->errcode()) ) { |
696 |
if ( defined($context->{"Zconn"}->{$server}->{$async}) && (0 == $context->{"Zconn"}->{$server}->{$async}->errcode()) ) { |
697 |
return $context->{"Zconn"}->{$server}; |
697 |
return $context->{"Zconn"}->{$server}->{$async}; |
698 |
# No connection object or it died. Create one. |
698 |
# No connection object or it died. Create one. |
699 |
}else { |
699 |
}else { |
700 |
# release resources if we're closing a connection and making a new one |
700 |
# release resources if we're closing a connection and making a new one |
Lines 703-714
sub Zconn {
Link Here
|
703 |
# and make a new one, particularly for a batch job. However, at |
703 |
# and make a new one, particularly for a batch job. However, at |
704 |
# first glance it does not look like there's a way to easily check |
704 |
# first glance it does not look like there's a way to easily check |
705 |
# the basic health of a ZOOM::Connection |
705 |
# the basic health of a ZOOM::Connection |
706 |
$context->{"Zconn"}->{$server}->destroy() if defined($context->{"Zconn"}->{$server}); |
706 |
$context->{"Zconn"}->{$server}->{$async}->destroy() if defined($context->{"Zconn"}->{$server}->{$async}); |
707 |
|
707 |
|
708 |
$context->{"Zconn"}->{$server} = &_new_Zconn($server,$async,$auth,$piggyback,$syntax); |
708 |
$context->{"Zconn"}->{$server}->{$async} = &_new_Zconn($server,$async,$auth,$piggyback,$syntax); |
709 |
$context->{ Zconn }->{ $server }->option( |
709 |
$context->{ Zconn }->{ $server }->{$async}->option( |
710 |
preferredRecordSyntax => C4::Context->preference("marcflavour") ); |
710 |
preferredRecordSyntax => C4::Context->preference("marcflavour") ); |
711 |
return $context->{"Zconn"}->{$server}; |
711 |
return $context->{"Zconn"}->{$server}->{$async}; |
712 |
} |
712 |
} |
713 |
} |
713 |
} |
714 |
|
714 |
|
715 |
- |
|
|