Replacing Atomic* with standard data types.
Refactoring reconnect logic.
Enable unlimited reconnect attempts.