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

PLAT-10616: add exception catch for connection close and increase tim… #9151

Merged
merged 3 commits into from
Feb 10, 2020

Conversation

inbal-ben-david
Copy link
Collaborator

…eouts

$this->connectionTimeout = isset($rabbitConfig['connection_timeout']) ? $rabbitConfig['connection_timeout'] : 1;
$this->readWriteTimeout = isset($rabbitConfig['read_write_timeout']) ? $rabbitConfig['read_write_timeout'] : 2;
$this->channelRpcTimeout = isset($rabbitConfig['channel_rpc_timeout']) ? $rabbitConfig['channel_rpc_timeout'] : 1 ;
$this->connectionTimeout = isset($rabbitConfig['connection_timeout']) ? $rabbitConfig['connection_timeout'] : 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

In all the 3 use default values with CONST


protected function closeConnection($connection)
{
$connStart = microtime(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Misleading name - better use before, since we don't know when the connection really started.

catch (Exception $e)
{
$connTook = microtime(true) - $connStart;
$logStr = "Failed to close connection";
Copy link
Contributor

Choose a reason for hiding this comment

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

Single quotes

@MosheMaorKaltura
Copy link
Contributor

reviewed

@inbal-ben-david inbal-ben-david merged commit a1b5ae2 into Orion-15.17.0 Feb 10, 2020
@inbal-ben-david inbal-ben-david deleted the Orion-15.17.0-PLAT-10616 branch February 10, 2020 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants