Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default retry_limit #19

Conversation

samshinde
Copy link

Signed-off-by: Amol Shinde [email protected]

Description

retry_limit was not being overridden by connection_retries. So, the program was trying(mostly 200 times) to make a connection for longer period of time.

Related Issue

Fixes #16

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

Signed-off-by: Amol Shinde <[email protected]>
retry_limit: @connection_retries.to_i,
retry_delay: @connection_retry_sleep.to_i,
}.merge(retry_options)
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right to me. The usual order of preference overrides is: global -> ENV -> cmdline -> object -> method call... So that big loses to little. This change means that the options passed to the local session call are overridden by the object's ivars.

Also, a change like this really should have a test confirming the problem ad the fix.

@zenspider zenspider requested a review from miah December 9, 2019 21:00
Copy link
Contributor

@miah miah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is stale and needs more thought on how we're going to resolve the issue.

@Schwad
Copy link

Schwad commented Jun 16, 2020

I agree that this would benefit from a test to replicate and document the problem and the fix, otherwise it requires some slightly tricky replication to confirm from our end.

I also see the issue with overriding (big losing to little), but with a confirming test and possibly a documenting comment explaining the override this could be closer to where it needs to be. 😄

@james-stocks
Copy link

Closing, review comments haven't been addressed in over 9 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix connection_retries to override retry_limit
5 participants