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;
|
||||
}
|
||||
if (_cardMonitor.GetCurrentState(0) == SCRState.Unknown ||
|
||||
_cardMonitor.GetCurrentState(0) == SCRState.Unavailable ||
|
||||
_cardMonitor.GetCurrentState(0) == SCRState.Unaware)
|
||||
Console.WriteLine(_cardMonitor.GetCurrentState(0));
|
||||
if (_cardMonitor.GetCurrentState(0) == SCRState.Unknown
|
||||
|| _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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user