summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-02-13 11:06:18 +0100
committerYorhel <git@yorhel.nl>2010-02-13 11:06:18 +0100
commit66b4249b62682eb754d5e3bb4fe66c6dd03b09d5 (patch)
treed7f6e6f5e1198de7e758eac6aee0950db4b4ae4d
parentb51398cd6c166e4cc0c59177d5b83663adf28449 (diff)
Multi::Anime: Some minor fixes when the UDP API is down or returns an error
-rw-r--r--lib/Multi/Anime.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Multi/Anime.pm b/lib/Multi/Anime.pm
index 793cbe07..05852e49 100644
--- a/lib/Multi/Anime.pm
+++ b/lib/Multi/Anime.pm
@@ -180,8 +180,8 @@ sub receivepacket { # input, wheelid
my $time = time-$_[HEAP]{lm};
# tag incorrect, ignore message
- return $_[KERNEL]->call(core => log => 'Ignoring incorrect tag of message: %d %s', $code, $msg)
- if $tag != $_[HEAP]{tag};
+ return $_[KERNEL]->call(core => log => 'Ignoring incorrect tag of message: %s', $r[0])
+ if !$tag || $tag != $_[HEAP]{tag};
# unhandled code, ignore as well
return $_[KERNEL]->call(core => log => 'Ignoring unhandled code %d (%s)', $code, $msg)
@@ -197,7 +197,7 @@ sub receivepacket { # input, wheelid
my $delay = $_[HEAP]{msgdelay}**(1 + $_[HEAP]{tm}*$_[HEAP]{timeoutdelay});
$delay = $_[HEAP]{maxtimeoutdelay} if $delay > $_[HEAP]{maxtimeoutdelay};
$_[KERNEL]->call(core => log => 'Reply timed out, delaying %.0fs.', $delay);
- return $_[KERNEL]->delay(nextcmd => $_[HEAP]{msgdelay});
+ return $_[KERNEL]->delay(nextcmd => $delay);
}
# message wasn't a timeout, reset timeout counter