Hello!
First, thanks for your work with Thruway. 🙏
I'm trying to use a Thruway\Connection which uses internally Thruway\Transport\PawlTransportProvider and Thruway\Peer\Client.
Everything works as expected when I pass a "valid" $options array :
$connection = new Connection([
'realm' => $realm,
'authid' => $token,
'url' => $url,
'authmethods' => ['jwt'],
'onChallenge' => function () {
return 'challenge-message';
},
]);
But what if for example $token contains an invalid token?
The Client onOpen() function looks like:
public function onOpen(TransportInterface $transport) {
$this->retryTimer = 0; // ?
$this->retryAttempts = 0; // ?
$this->transport = $transport;
$session = new ClientSession($transport, $this);
$this->session = $session;
$session->setLoop($this->getLoop());
$session->setState(ClientSession::STATE_DOWN);
$this->startSession($session);
}
My question is: Why re-set retryTimer and retryAttempts here?
In my case it causes an infinite loop of retries.
Hello!
First, thanks for your work with Thruway. 🙏
I'm trying to use a
Thruway\Connectionwhich uses internallyThruway\Transport\PawlTransportProviderandThruway\Peer\Client.Everything works as expected when I pass a "valid"
$optionsarray :But what if for example
$tokencontains an invalid token?wamp.error.authentication_failederrorClientonClose()function https://github.com/thruway/client/blob/master/src/Peer/Client.php#L442ClientretryConnection()function https://github.com/thruway/client/blob/master/src/Peer/Client.php#L465PawlTransportProviderstartTransportProvider()function https://github.com/thruway/client/blob/master/src/Peer/Client.php#L490ClientonOpen()function https://github.com/thruway/pawl-transport/blob/master/src/PawlTransportProvider.php#L54The
ClientonOpen()function looks like:My question is: Why re-set
retryTimerandretryAttemptshere?In my case it causes an infinite loop of retries.