Added maxReconnectTimes to ClientConfig and fixed tests