]> Sergey Matveev's repositories - public-inbox.git/commitdiff
ds: remove support for DS->write(undef)
authorEric Wong <e@80x24.org>
Mon, 24 Jun 2019 02:52:11 +0000 (02:52 +0000)
committerEric Wong <e@80x24.org>
Mon, 24 Jun 2019 05:26:26 +0000 (05:26 +0000)
We call ->flush_write directly, now; so we can eliminate a
needless check.

lib/PublicInbox/DS.pm

index 8fc49eee67e9c0b564f1d0800284a8eec05f52d0..ba8bd95f1b226f3077f1f4743de38ab6f541b1d8 100644 (file)
@@ -518,14 +518,13 @@ sub flush_write ($) {
 =head2 C<< $obj->write( $data ) >>
 
 Write the specified data to the underlying handle.  I<data> may be scalar,
-scalar ref, code ref (to run when there), or undef just to kick-start.
+scalar ref, code ref (to run when there).
 Returns 1 if writes all went through, or 0 if there are writes in queue. If
 it returns 1, caller should stop waiting for 'writable' events)
 
 =cut
 sub write {
     my ($self, $data) = @_;
-    return flush_write($self) unless defined $data;
 
     # nobody should be writing to closed sockets, but caller code can
     # do two writes within an event, have the first fail and