Fix: Align radius timeout to default

This commit is contained in:
Nelson Chan 2023-05-23 18:18:54 +08:00
parent 9dc02bb8e2
commit f1a396b0f7
2 changed files with 5 additions and 1 deletions

View File

@ -671,7 +671,8 @@ class Monitor extends BeanModel {
this.radiusCalledStationId,
this.radiusCallingStationId,
this.radiusSecret,
port
port,
this.interval * 1000 * 0.8,
);
if (resp.code) {
bean.msg = resp.code;

View File

@ -373,6 +373,7 @@ exports.mongodbPing = async function (connectionString) {
* @param {string} callingStationId ID of calling station
* @param {string} secret Secret to use
* @param {number} [port=1812] Port to contact radius server on
* @param {number} [timeout=2500] Timeout for connection to use
* @returns {Promise<any>}
*/
exports.radius = function (
@ -383,10 +384,12 @@ exports.radius = function (
callingStationId,
secret,
port = 1812,
timeout = 2500,
) {
const client = new radiusClient({
host: hostname,
hostPort: port,
timeout: timeout,
dictionaries: [ file ],
});