The current implementation is not able to reconnect to Asterisk AMI per two reasons:
There's a missed parameter when connect function is called
The re-connection time in the fourth try is increased to almost 1 day, is too much time to wait for re-connection, so, in this commits the maximum re-connection time has been set to 60 seconds.
The current implementation is not able to reconnect to Asterisk AMI per two reasons: