X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FMsg.pm;h=ae9c4c28699709a3f34a771d0062568f74323071;hb=cd86a5d3129e75ceef32b739f5a0cb5988ce7cd6;hp=3b96c812e502b51b16f5b6a493cbae14aa3e4822;hpb=6374fb31da62987e676244c38eb6cf73c81bf891;p=spider.git 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};