Reconnect to master server when connection lost