From: minima Date: Tue, 17 Apr 2001 20:24:16 +0000 (+0000) Subject: make write complete X-Git-Tag: R_1_47~21 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=deb8356e97b2aacab345b791ab39784da8d3fe37;p=spider.git make write complete --- diff --git a/perl/Msg.pm b/perl/Msg.pm index 3b96c812..ae9c4c28 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -287,13 +287,11 @@ sub _send { delete $conn->{send_offset}; $offset = 0; shift @$rq; - last unless $flush; # Go back to select and wait + #last unless $flush; # Go back to select and wait # for it to fire again. } # Call me back if queue has not been drained. - if (@$rq) { - set_event_handler ($sock, write => sub {$conn->_send(0)}); - } else { + unless (@$rq) { set_event_handler ($sock, write => undef); if (exists $conn->{close_on_empty}) { &{$conn->{eproc}}($conn, undef) if exists $conn->{eproc};