pipobscure / NodeJS-AsteriskManager

NodeJS Asterisk Manager API
Other
248 stars 103 forks source link

Delay before reconnect #40

Closed 2naive closed 7 years ago

2naive commented 9 years ago

Hi!

This https://github.com/pipobscure/NodeJS-AsteriskManager/blob/master/lib/ami.js#L238 causes infinite loop of reconnects. Moreover, If you try to log with

ami.on('error', function(evt) {
    console.log(evt);
});

You will get blowing up log files.

I think we should add a delay before reconnect

pipobscure commented 7 years ago

50