Skip to content

Commit

Permalink
Make sure buffers is predefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed Apr 29, 2012
1 parent eb50751 commit 9768443
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Revision history for AnyEvent-Handle-UDP

{{$NEXT}}
Make push_send accept an address array too
Make sure buffers is predefined

0.033 2012-02-19 17:35:10 Europe/Amsterdam
Make push_send optionally take a $cv, and only return one if called in non-void context
Expand Down
3 changes: 2 additions & 1 deletion lib/AnyEvent/Handle/UDP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ sub BUILD {
my $self = shift;
$self->bind_to($self->_bind_addr) if $self->_has_bind_addr;
$self->connect_to($self->_connect_addr) if $self->_has_connect_addr;
$self->{buffers} = [];
$self->_drained;
return;
}
Expand Down Expand Up @@ -134,7 +135,7 @@ sub _on_addr {
my ($domain, $type, $proto, $sockaddr) = @{$target};
my $full = join ':', $domain, $type, $proto;
if ($self->_has_full) {
return redo if $self->_full ne $full;
redo if $self->_full ne $full;
}
else {
socket $self->fh, $domain, $type, $proto or redo;
Expand Down

0 comments on commit 9768443

Please sign in to comment.