Skip to content

Commit

Permalink
Restore initial packet attributes after each retry when trying a list…
Browse files Browse the repository at this point in the history
… of servers. Really Fixes #19
  • Loading branch information
dapphp committed Jan 25, 2022
1 parent 6b9eed2 commit 83eab38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Radius.php
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,8 @@ public function accessRequestList($serverList, $username = '', $password = '', $
return false;
}

$attributes = $this->getAttributesToSend(); // store base attributes

foreach($serverList as $server) {
$this->setServer($server);

Expand All @@ -1115,6 +1117,7 @@ public function accessRequestList($serverList, $username = '', $password = '', $
break; // access rejected
} else {
/* timeout or other possible transient error; try next host */
$this->attributesToSend = $attributes; // reset base attributes
}
}

Expand Down Expand Up @@ -1519,6 +1522,8 @@ public function accessRequestEapMsChapV2List($serverList, $username, $password)
return false;
}

$attributes = $this->getAttributesToSend(); // store base attributes

foreach($serverList as $server) {
$this->setServer($server);

Expand All @@ -1530,6 +1535,7 @@ public function accessRequestEapMsChapV2List($serverList, $username, $password)
break; // access rejected
} else {
/* timeout or other possible transient error; try next host */
$this->attributesToSend = $attributes; // reset base attributes
}
}

Expand Down

0 comments on commit 83eab38

Please sign in to comment.