diff --git a/lib/train-winrm/connection.rb b/lib/train-winrm/connection.rb index 31baa53..bc279f1 100644 --- a/lib/train-winrm/connection.rb +++ b/lib/train-winrm/connection.rb @@ -189,10 +189,10 @@ def login_command_for_windows # @api private def session(retry_options = {}) @session ||= begin - opts = { + opts = retry_options.merge({ retry_limit: @connection_retries.to_i, retry_delay: @connection_retry_sleep.to_i, - }.merge(retry_options) + }) opts[:operation_timeout] = @operation_timeout unless @operation_timeout.nil? @service = ::WinRM::Connection.new(options.merge(opts))