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

Comparing AnyEvent/lib/AnyEvent/Handle.pm (file contents):
Revision 1.234 by root, Wed Apr 18 09:44:10 2012 UTC vs.
Revision 1.235 by root, Tue May 8 19:41:22 2012 UTC

2240handles requests until the server gets some QUIT command, causing it to 2240handles requests until the server gets some QUIT command, causing it to
2241close the connection first (highly desirable for a busy TCP server). A 2241close the connection first (highly desirable for a busy TCP server). A
2242client dropping the connection is an error, which means this variant can 2242client dropping the connection is an error, which means this variant can
2243detect an unexpected detection close. 2243detect an unexpected detection close.
2244 2244
2245To handle this case, always make sure you have a on-empty read queue, by 2245To handle this case, always make sure you have a non-empty read queue, by
2246pushing the "read request start" handler on it: 2246pushing the "read request start" handler on it:
2247 2247
2248 # we assume a request starts with a single line 2248 # we assume a request starts with a single line
2249 my @start_request; @start_request = (line => sub { 2249 my @start_request; @start_request = (line => sub {
2250 my ($hdl, $line) = @_; 2250 my ($hdl, $line) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines