You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we pass an invalid vhost, the broker sends a ConnectionCloseFrame and terminates the connection, but Ridge does not capture this frame and does not throw an exception.
Example:
useAmp\Loop;
usePHPinnacle\Ridge\Client;
Loop::run(function () {
$client = Client::create('amqp://guest:guest@localhost:5672/unknown-vhost');
yield $client->connect();
echo"Execution will never get here. Nor will an exception be thrown.";
// (...)
});
and should respond appropriately depending on the reason for closing the connection.
If we pass the wrong vhost replyCode is 530 (decimal) and replyText"NOT_ALLOWED - vhost unknown-vhost not found".
Additionally, the status change to STATE_DISCONNECTING and STATE_NOT_CONNECTED is missing in the code below.
When we pass an invalid vhost, the broker sends a ConnectionCloseFrame and terminates the connection, but Ridge does not capture this frame and does not throw an exception.
Example:
This code:
should be in front of:
ridge/src/Client.php
Lines 122 to 124 in adcced8
and should respond appropriately depending on the reason for closing the connection.
If we pass the wrong vhost
replyCode
is530
(decimal) andreplyText
"NOT_ALLOWED - vhost unknown-vhost not found"
.Additionally, the status change to
STATE_DISCONNECTING
andSTATE_NOT_CONNECTED
is missing in the code below.ridge/src/Client.php
Lines 126 to 141 in adcced8
The text was updated successfully, but these errors were encountered: