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

Give meaningful error when retry_count is zero #166

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

Totktonada
Copy link
Member

Clarified docs about this setting.

There may be a confusion whether the setting means overall amount of
connection attempts or amount after the initial unsuccessful attempt.
Usually a retries amount option means the latter, but here it means the
former.

Decided to don't change behaviour or the setting name to provide perfect
backward compatibility, but give meaningful error and clarify docs. See
the discussion in 1.

Fixes #83

@Totktonada
Copy link
Member Author

BTW, I checked what ini_set() do on an incorrect value (say, when OnUpdateLongGEZero is used in STD_PHP_INI_ENTRY and -1 is passed as the new value) and it just returns false: no exception is raised. I guess we should not raise an exception from the method, so I have added the check into the code that perform a connection.

Clarified docs about this setting.

There may be a confusion whether the setting means overall amount of
connection attempts or amount after the initial unsuccessful attempt.
Usually a retries amount option means the latter, but here it means the
former.

Decided to don't change behaviour or the setting name to provide perfect
backward compatibility, but give meaningful error and clarify docs. See
the discussion in [1].

[1]: #145 (comment)

Fixes #83
@Totktonada Totktonada force-pushed the Totktonada/gh-83-fix-zero-retry-count branch from f378da2 to c68fdee Compare July 15, 2020 01:08
@Totktonada
Copy link
Member Author

Totktonada commented Jul 15, 2020

Updated to support tarantool-1.6 in tests.

@Totktonada Totktonada merged commit 97ae22d into master Jul 17, 2020
@Totktonada Totktonada deleted the Totktonada/gh-83-fix-zero-retry-count branch July 17, 2020 17:42
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.

An exception occurs while trying to disable connection retries
2 participants