Open fbernhard opened 4 years ago
This code should also check for "EHOSTUNREACH":
https://github.com/asterisk/node-ari-client/blob/0933f88a9ebb8244d0505cc4553da6ef0dd2777d/lib/client.js#L113
if request throws an "EHOSTUNREACH" the system continues with the connection attempt which leads the library to "hang".
https://nodejs.org/api/os.html#os_signal_constants
Alternatively, maybe check for statusCode 200?
request(ariUrl, function (err, response) { if (err || !response || response.statusCode !== 200) {
Thank you!
This code should also check for "EHOSTUNREACH":
https://github.com/asterisk/node-ari-client/blob/0933f88a9ebb8244d0505cc4553da6ef0dd2777d/lib/client.js#L113
if request throws an "EHOSTUNREACH" the system continues with the connection attempt which leads the library to "hang".
https://nodejs.org/api/os.html#os_signal_constants
Alternatively, maybe check for statusCode 200?
Thank you!