Skip to content

Commit

Permalink
Merge pull request hollie#246 from krkeegan/insteon_diags_fix
Browse files Browse the repository at this point in the history
Insteon_Diags: Make Sure Setby is an Object
  • Loading branch information
krkeegan committed Aug 13, 2013
2 parents 75a33ab + 2d998fd commit e87291d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Insteon/Message.pm
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ sub send
&::print_log("[Insteon::BaseMessage] WARN: now resending "
. $self->to_string() . " after " . $self->send_attempts
. " attempts.") if $main::Debug{insteon};
$self->setby->retry_count_log(1) if $self->setby->can('retry_count_log');
# revise default hop count to reflect retries
if (ref $self->setby && $self->setby->isa('Insteon::BaseObject')
&& !defined($$self{no_hop_increase}))
{
$self->setby->retry_count_log(1) if $self->setby->can('retry_count_log');
if ($self->setby->default_hop_count < 3)
{
$self->setby->default_hop_count($self->setby->default_hop_count + 1);
Expand All @@ -238,7 +238,7 @@ sub send
}

# need to set timeout as a function of retries; also need to alter hop count
if ($self->send_attempts <= 0) {
if ($self->send_attempts <= 0 && ref $self->setby) {
$self->setby->outgoing_count_log(1) if $self->setby->can('outgoing_count_log');
$self->setby->outgoing_hop_count($self->setby->default_hop_count)
if $self->setby->can('outgoing_hop_count');
Expand Down

0 comments on commit e87291d

Please sign in to comment.