Skip to content

Instantly share code, notes, and snippets.

Created December 17, 2014 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/52829810eaf35c58170e to your computer and use it in GitHub Desktop.
Save anonymous/52829810eaf35c58170e to your computer and use it in GitHub Desktop.
diff --git a/lib/Mojo/IOLoop/Stream.pm b/lib/Mojo/IOLoop/Stream.pm
index 62ad230..91166a8 100644
--- a/lib/Mojo/IOLoop/Stream.pm
+++ b/lib/Mojo/IOLoop/Stream.pm
@@ -122,7 +122,7 @@ sub _write {
my $handle = $self->{handle};
if (length $self->{buffer}) {
my $written = $handle->syswrite($self->{buffer});
- return $self->_error unless defined $written;
+ return unless defined $written;
$self->emit(write => substr($self->{buffer}, 0, $written, ''))->_again;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment