mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2026-03-13 16:53:59 +01:00
Explicitly abort on timeout
This commit is contained in:
parent
70fd58c080
commit
7f19a2531e
|
|
@ -80,7 +80,12 @@ namespace NmeaParser
|
|||
readCount = await ReadAsync(buffer, 0, 1024, token).ConfigureAwait(false);
|
||||
failcounter = 0;
|
||||
}
|
||||
catch(System.Exception ex)
|
||||
catch (TimeoutException t)
|
||||
{
|
||||
OnDisconnecting(t);
|
||||
break;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
failcounter++;
|
||||
if (failcounter > 10)
|
||||
|
|
|
|||
Loading…
Reference in a new issue