-
-
Save anonymous/1f8e862f764930e51fe7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Mojo/IOLoop/Stream.pm b/lib/Mojo/IOLoop/Stream.pm | |
index 5dcb939..611e60c 100644 | |
--- a/lib/Mojo/IOLoop/Stream.pm | |
+++ b/lib/Mojo/IOLoop/Stream.pm | |
@@ -85,6 +85,7 @@ sub write { | |
my ($self, $chunk, $cb) = @_; | |
$self->{buffer} .= $chunk; | |
+ $self->_write; | |
if ($cb) { $self->once(drain => $cb) } | |
elsif (!length $self->{buffer}) { return $self } | |
$self->reactor->watch($self->{handle}, !$self->{paused}, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment