revert to zmMemInvalidate
This commit is contained in:
parent
61d3ecf9c1
commit
631c13ab1a
|
@ -85,10 +85,6 @@ while( 1 ) {
|
|||
while( my $monitor = $sth->fetchrow_hashref() ) {
|
||||
next if $monitor->{Function} eq 'None';
|
||||
my $restart = 0;
|
||||
# Prevent open handles building up if we have connect to shared memory
|
||||
# Many of our error checks below do a next without closing the mem handle.
|
||||
# zmMemDetach will just return of nothing is open, so we can just do this here.
|
||||
zmMemDetach( $monitor );
|
||||
if ( zmMemVerify( $monitor )
|
||||
&& zmMemRead( $monitor, "shared_data:valid" )
|
||||
)
|
||||
|
@ -98,6 +94,7 @@ while( 1 ) {
|
|||
if ( !defined($image_time) ) {
|
||||
# Can't read from shared data
|
||||
Debug( "LastWriteTime is not defined." );
|
||||
zmMemInvalidate( $monitor );
|
||||
next;
|
||||
}
|
||||
Debug( "LastWriteTime is = $image_time." );
|
||||
|
@ -108,6 +105,7 @@ while( 1 ) {
|
|||
$restart = 1;
|
||||
} else {
|
||||
# We can't get the last capture time so can't be sure it's died, it might just be starting up.
|
||||
zmMemInvalidate( $monitor );
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +176,7 @@ while( 1 ) {
|
|||
} # end if restart
|
||||
} # end if check analysis daemon
|
||||
# Prevent open handles building up if we have connect to shared memory
|
||||
zmMemDetach( $monitor ); # Close our file handle to the zmc process we are about to end
|
||||
zmMemInvalidate( $monitor ); # Close our file handle to the zmc process we are about to end
|
||||
} # end foreach monitor
|
||||
sleep( $Config{ZM_WATCH_CHECK_INTERVAL} );
|
||||
} # end while (1)
|
||||
|
|
Loading…
Reference in New Issue