-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
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?
- We receive a
wamp.error.authentication_failederror - Pawl connection closes https://github.com/thruway/pawl-transport/blob/master/src/PawlTransportProvider.php#L74
- Which calls
ClientonClose()function https://github.com/thruway/client/blob/master/src/Peer/Client.php#L442 - Which calls
ClientretryConnection()function https://github.com/thruway/client/blob/master/src/Peer/Client.php#L465 - Which calls
PawlTransportProviderstartTransportProvider()function https://github.com/thruway/client/blob/master/src/Peer/Client.php#L490 - Which calls
ClientonOpen()function https://github.com/thruway/pawl-transport/blob/master/src/PawlTransportProvider.php#L54
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.
Metadata
Metadata
Assignees
Labels
No labels