Fix flakyness
This commit is contained in:
parent
55bbfc8954
commit
55c89aa0a9
@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>1.0.17</Version>
|
||||
<Version>1.0.18</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@ -95,7 +95,11 @@ waitStateChange:
|
||||
var reader = new SCardReader(context);
|
||||
res = reader.Connect(readerName, SCardShareMode.Shared, SCardProtocol.Any);
|
||||
if (res == SCardError.Success)
|
||||
{
|
||||
// Somehow without this presenting the card is flaky
|
||||
Thread.Sleep(50);
|
||||
return new PCSCContext(reader, context);
|
||||
}
|
||||
goto rescanReaders;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>1.0.19</Version>
|
||||
<Version>1.0.20</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@ -163,7 +163,7 @@ public class UnitTest1
|
||||
[Fact]
|
||||
public async Task CanAuthenticate()
|
||||
{
|
||||
using var ctx = PCSCContext.Create();
|
||||
using var ctx = await PCSCContext.WaitForCard();
|
||||
var ntag = ctx.CreateNTag424();
|
||||
var key = AESKey.Default;
|
||||
await ntag.AuthenticateEV2First(0, key);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user