zmMemVerify now checks valid, so don't need to do it again.

This commit is contained in:
Isaac Connor 2017-01-10 15:32:38 -05:00
parent 7ddd5359d0
commit 7502b81064
2 changed files with 3 additions and 11 deletions

View File

@ -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;
}

View File

@ -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) ) {