ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Socket.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Socket.pm (file contents):
Revision 1.90 by root, Thu Jul 16 04:16:25 2009 UTC vs.
Revision 1.91 by root, Thu Jul 16 04:20:24 2009 UTC

714 my $handle; # avoid direct assignment so on_eof has it in scope. 714 my $handle; # avoid direct assignment so on_eof has it in scope.
715 $handle = new AnyEvent::Handle 715 $handle = new AnyEvent::Handle
716 fh => $fh, 716 fh => $fh,
717 on_error => sub { 717 on_error => sub {
718 warn "error $_[2]\n"; 718 warn "error $_[2]\n";
719 $_[0]->destroy;
719 }, 720 },
720 on_eof => sub { 721 on_eof => sub {
721 $handle->destroy; # destroy handle 722 $handle->destroy; # destroy handle
722 warn "done.\n"; 723 warn "done.\n";
723 }; 724 };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines