Fix memory leak issue, where we would create a duplicate cardmonitor for an "unaware" card reader state.
This commit is contained in:
parent
7ec0db9ebb
commit
3eef3017a0
@ -37,9 +37,11 @@ namespace CardReaderService
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (_cardMonitor.GetCurrentState(0) == SCRState.Unknown ||
|
Console.WriteLine(_cardMonitor.GetCurrentState(0));
|
||||||
_cardMonitor.GetCurrentState(0) == SCRState.Unavailable ||
|
if (_cardMonitor.GetCurrentState(0) == SCRState.Unknown
|
||||||
_cardMonitor.GetCurrentState(0) == SCRState.Unaware)
|
|| _cardMonitor.GetCurrentState(0) == SCRState.Unavailable
|
||||||
|
//|| _cardMonitor.GetCurrentState(0) == SCRState.Unaware //if we say this is an invalid state, we cause a memory leak where we create a duplicate card monitor, subscribe and overwrite.
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user