From 39de3cbd52a2b416e7affbbebbd2c94e505efe66 Mon Sep 17 00:00:00 2001 From: Amol Shinde Date: Wed, 25 Sep 2019 17:15:53 +0530 Subject: [PATCH] Fix default retry_limit Signed-off-by: Amol Shinde --- lib/train-winrm/connection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))