-
-
Save anonymous/19cc5f9b6d24e3f81810 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/Client.pm b/lib/Mojo/IOLoop/Client.pm | |
index f349873..9d17d65 100644 | |
--- a/lib/Mojo/IOLoop/Client.pm | |
+++ b/lib/Mojo/IOLoop/Client.pm | |
@@ -81,7 +81,8 @@ sub _ready { | |
my $handle = $self->{handle}; | |
return $! == EINPROGRESS ? undef : $self->emit(error => $!) | |
if $handle->isa('IO::Socket::IP') && !$handle->connect; | |
- return $self->emit(error => $! = $handle->sockopt(SO_ERROR)) | |
+ return $self->emit(error => $! | |
+ = $handle->sockopt(SO_ERROR) || "Can't connect") | |
unless $handle->connected; | |
# Disable Nagle's algorithm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment