diff --git a/lib/aws/s3/connection.rb b/lib/aws/s3/connection.rb
index 44ca323..c590c70 100644
--- a/lib/aws/s3/connection.rb
+++ b/lib/aws/s3/connection.rb
@@ -49,7 +49,7 @@ module AWS
else
http.start(&requester)
end
- rescue Errno::EPIPE, Timeout::Error, Errno::EPIPE, Errno::EINVAL
+ rescue Errno::EPIPE, Timeout::Error, Errno::EINVAL
@http = create_connection
attempts == 3 ? raise : (attempts += 1; retry)
end
@@ -178,7 +178,7 @@ module AWS
# will be implicitly set to 443, unless specified otherwise. Defaults to false.
# * :persistent - Whether to use a persistent connection to the server. Having this on provides around a two fold
# performance increase but for long running processes some firewalls may find the long lived connection suspicious and close the connection.
- # If you run into connection errors, try setting :persistent to false. Defaults to true.
+ # If you run into connection errors, try setting :persistent to false. Defaults to false.
# * :proxy - If you need to connect through a proxy, you can specify your proxy settings by specifying a :host, :port, :user, and :password
# with the :proxy option.
# The :host setting is required if specifying a :proxy.
@@ -278,7 +278,7 @@ module AWS
end
def extract_persistent!
- self[:persistent] = options.has_key?(:persitent) ? options[:persitent] : true
+ self[:persistent] = options.has_key?(:persitent) ? options[:persitent] : false
end
def extract_proxy_settings!
diff --git a/test/connection_test.rb b/test/connection_test.rb
index c0ac516..88556aa 100644
--- a/test/connection_test.rb
+++ b/test/connection_test.rb
@@ -27,12 +27,12 @@ class ConnectionTest < Test::Unit::TestCase
assert_equal 'https://', connection.protocol
end
- def test_connection_is_persistent_by_default
+ def test_connection_is_not_persistent_by_default
connection = Connection.new(@keys)
- assert connection.persistent?
-
- connection = Connection.new(@keys.merge(:persistent => false))
assert !connection.persistent?
+
+ connection = Connection.new(@keys.merge(:persistent => true))
+ assert connection.persistent?
end
def test_server_and_port_are_passed_onto_connection