mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-12 16:44:12 -08:00
Fix: Align radius timeout to default
This commit is contained in:
parent
9dc02bb8e2
commit
f1a396b0f7
|
@ -671,7 +671,8 @@ class Monitor extends BeanModel {
|
||||||
this.radiusCalledStationId,
|
this.radiusCalledStationId,
|
||||||
this.radiusCallingStationId,
|
this.radiusCallingStationId,
|
||||||
this.radiusSecret,
|
this.radiusSecret,
|
||||||
port
|
port,
|
||||||
|
this.interval * 1000 * 0.8,
|
||||||
);
|
);
|
||||||
if (resp.code) {
|
if (resp.code) {
|
||||||
bean.msg = resp.code;
|
bean.msg = resp.code;
|
||||||
|
|
|
@ -373,6 +373,7 @@ exports.mongodbPing = async function (connectionString) {
|
||||||
* @param {string} callingStationId ID of calling station
|
* @param {string} callingStationId ID of calling station
|
||||||
* @param {string} secret Secret to use
|
* @param {string} secret Secret to use
|
||||||
* @param {number} [port=1812] Port to contact radius server on
|
* @param {number} [port=1812] Port to contact radius server on
|
||||||
|
* @param {number} [timeout=2500] Timeout for connection to use
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
exports.radius = function (
|
exports.radius = function (
|
||||||
|
@ -383,10 +384,12 @@ exports.radius = function (
|
||||||
callingStationId,
|
callingStationId,
|
||||||
secret,
|
secret,
|
||||||
port = 1812,
|
port = 1812,
|
||||||
|
timeout = 2500,
|
||||||
) {
|
) {
|
||||||
const client = new radiusClient({
|
const client = new radiusClient({
|
||||||
host: hostname,
|
host: hostname,
|
||||||
hostPort: port,
|
hostPort: port,
|
||||||
|
timeout: timeout,
|
||||||
dictionaries: [ file ],
|
dictionaries: [ file ],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue