fix to fire reconnect failed event, and max reconnection attempts