-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
If a new instance of radclient has a wrong secret but has correct parameters otherwise, the server crashes with the following error.
Error: RADIUS response is invalid
at Socket.<anonymous> (/app/src/node_modules/radclient/index.js:132:35)
at emitTwo (events.js:106:13)
at Socket.emit (events.js:191:7)
at UDP.onMessage (dgram.js:550:8)
A few lines later, another error pops up and crashes the server.
Error: Not running
at Socket._healthCheck (dgram.js:530:11)
at Socket.close (dgram.js:424:8)
at Timeout._onTimeout (/app/src/node_modules/radclient/index.js:85:24)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
If the secret is valid and other parameters (port, url) are incorrect, the debugger only responds with an Error: Maximum retries exceeded and does not crash the server.
The error thrown seems to be related to a timeout function that was not cleared if response is invalid. On line 132 of index.js: if (!isValid) return callback(new Error('RADIUS response is invalid')); the timeout function t haven't been cleared before function return. Adding a clearTimeout(t) inside the if statement solves the issue.
Metadata
Metadata
Assignees
Labels
No labels