Fix for Zconn not creating a new connection when zebra goes away and comes
authorChris Cormack <crc@liblime.com>
Tue, 12 Feb 2008 03:09:39 +0000 (21:09 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 12 Feb 2008 04:11:31 +0000 (22:11 -0600)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Context.pm

index 303b381..4a0564c 100644 (file)
@@ -494,7 +494,7 @@ sub Zconn {
     my $auth=shift;
     my $piggyback=shift;
     my $syntax=shift;
-    if ( defined($context->{"Zconn"}->{$server}) ) {
+    if ( defined($context->{"Zconn"}->{$server}) && !$context->{"Zconn"}->{$server}->exception() ) {
         return $context->{"Zconn"}->{$server};
     # No connection object or it died. Create one.
     }else {