We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 015a4fb + c6a7a6c commit ba9a265Copy full SHA for ba9a265
lib/redis/client.rb
@@ -340,6 +340,7 @@ def establish_connection
340
Errno::EHOSTDOWN,
341
Errno::EHOSTUNREACH,
342
Errno::ENETUNREACH,
343
+ Errno::ENOENT,
344
Errno::ETIMEDOUT
345
346
raise CannotConnectError, "Error connecting to Redis on #{location} (#{$!.class})"
test/internals_test.rb
@@ -158,6 +158,13 @@ def test_connection_timeout
158
assert (Time.now - start_time) <= opts[:timeout]
159
end
160
161
+ def test_missing_socket
162
+ opts = { :path => '/missing.sock' }
163
+ assert_raise Redis::CannotConnectError do
164
+ Redis.new(opts).ping
165
+ end
166
167
+
168
def close_on_ping(seq, options = {})
169
$request = 0
170
0 commit comments