private static bool _syncError;
method()
{
if (_syncError)
return;
}
try
connectWithService();
catch
_syncError = true;