Add server reconnection retries

Change-Id: I32086d0abf141c368343bf225d4b021da496c020