private void GetFeature(byte[] buffer)
{
int attempt = 0;
while (attempt < 5)
{
attempt++;
try
{
stream.GetFeature(buffer);
break;
}
catch (System.IO.IOException e)
{
if (e.InnerException is System.ComponentModel.Win32Exception)
{
System.ComponentModel.Win32Exception win32Exception = e.InnerException as System.ComponentModel.Win32Exception;
if (win32Exception != null && win32Exception.NativeErrorCode == 0)
return;
}
if (attempt == 5)
throw;
if (!WaitThread(20))
return;
}
}
}