Skip to content

Commit 83eab38

Browse files
committed
Restore initial packet attributes after each retry when trying a list of servers. Really Fixes dapphp#19
1 parent 6b9eed2 commit 83eab38

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Radius.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,8 @@ public function accessRequestList($serverList, $username = '', $password = '', $
11041104
return false;
11051105
}
11061106

1107+
$attributes = $this->getAttributesToSend(); // store base attributes
1108+
11071109
foreach($serverList as $server) {
11081110
$this->setServer($server);
11091111

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

@@ -1519,6 +1522,8 @@ public function accessRequestEapMsChapV2List($serverList, $username, $password)
15191522
return false;
15201523
}
15211524

1525+
$attributes = $this->getAttributesToSend(); // store base attributes
1526+
15221527
foreach($serverList as $server) {
15231528
$this->setServer($server);
15241529

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

0 commit comments

Comments
 (0)