Server crash
See original GitHub issueHello, thanks for your great tool. Sometimes the Server crash with the following error:
`(node:26909) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘Client ID’ of undefined at mkClient (/opt/openvpn-status/openvpn.js:5:14) at getClients.then (/opt/openvpn-status/openvpn.js:97:39) at process.tickCallback (internal/process/next_tick.js:68:7) (node:26909) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:26909) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. /opt/openvpn-status/openvpn.js:86 const [, clientId, received, sent] = data.match(/>BYTECOUNT_CLI:([0-9]+),([0-9]+),([0-9]+)/).map(itm => parseInt(itm, 10)) ^
TypeError: Cannot read property ‘map’ of null at client.procData (/opt/openvpn-status/openvpn.js:86:100) at items.forEach.itm (/opt/openvpn-status/openvpn.js:31:33) at Array.forEach (<anonymous>) at Socket.socket.on.data (/opt/openvpn-status/openvpn.js:31:13) at Socket.emit (events.js:198:13) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) `
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
with yours.
I’ll try and give you feedback.