[libanyevent-handle-udp-perl] 14/60: Make resend logic actually work
Jonas Smedegaard
js at alioth.debian.org
Mon Sep 30 10:05:38 UTC 2013
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository libanyevent-handle-udp-perl.
commit ae3e8e4a334839cb309289f59653af9cc317aa11
Author: Leon Timmermans <fawaka at gmail.com>
Date: Sun Feb 19 17:05:24 2012 +0100
Make resend logic actually work
---
Changes | 1 +
lib/AnyEvent/Handle/UDP.pm | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Changes b/Changes
index 101cb35..9892a7a 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,7 @@ Revision history for AnyEvent-Handle-UDP
{{$NEXT}}
Make push_send optionally take a $cv, and only return one if called in non-void context
+ Make resend logica actually work at all
Made on_drain more consistent
0.032 2012-02-14 02:13:50 Europe/Amsterdam
diff --git a/lib/AnyEvent/Handle/UDP.pm b/lib/AnyEvent/Handle/UDP.pm
index b68540d..de49a96 100644
--- a/lib/AnyEvent/Handle/UDP.pm
+++ b/lib/AnyEvent/Handle/UDP.pm
@@ -195,10 +195,11 @@ sub _push_writer {
push @{$self->{buffers}}, [ $message, $to, $condvar ];
$self->{writer} ||= AE::io $self->{fh}, 1, sub {
if (@{ $self->{buffers} }) {
- while (my ($msg, $to, $cv) = shift @{$self->{buffers}}) {
- my $ret = $self->_send(@{$msg}, $to, $cv);
+ while (my $entry = shift @{$self->{buffers}}) {
+ my ($msg, $to, $cv) = @{$entry};
+ my $ret = $self->_send($msg, $to, $cv);
if (not defined $ret) {
- unshift @{$self->{buffers}}, $msg;
+ unshift @{$self->{buffers}}, $entry;
$self->on_error->($self->{fh}, 1, "$!") if !$non_fatal{$! + 0};
last;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libanyevent-handle-udp-perl.git
More information about the Pkg-perl-cvs-commits
mailing list