diff --git a/scripts/zmtrigger.pl.in b/scripts/zmtrigger.pl.in index ac1b9d752..9e00f5ac8 100644 --- a/scripts/zmtrigger.pl.in +++ b/scripts/zmtrigger.pl.in @@ -314,15 +314,10 @@ while( 1 ) my @out_messages; foreach my $monitor ( values(%monitors) ) { - my $memVerified = 1; - if ( !zmMemRead($monitor, "shared_data:valid") ) { - # Shared data is invalid, attempt to reconnect - zmMemInvalidate($monitor); - $memVerified = zmMemVerify($monitor); - } - if ( ! $memVerified ) { + if ( ! zmMemVerify($monitor) ) { # Our attempt to verify the memory handle failed. We should reload the monitors. + # Don't need to zmMemInvalidate because the monitor reload will do it. $needsReload = 1; next; } diff --git a/scripts/zmwatch.pl.in b/scripts/zmwatch.pl.in index afdd0b193..c5ef158ea 100644 --- a/scripts/zmwatch.pl.in +++ b/scripts/zmwatch.pl.in @@ -87,10 +87,7 @@ while( 1 ) { next if $monitor->{Function} eq 'None'; my $restart = 0; - if ( zmMemVerify( $monitor ) - && zmMemRead( $monitor, "shared_data:valid" ) - ) - { + if ( zmMemVerify( $monitor ) ) { # Check we have got an image recently my $image_time = zmGetLastWriteTime( $monitor ); if ( !defined($image_time) ) {