mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
Fixed small bug
This commit is contained in:
parent
34934e56c7
commit
ed5ed0999a
@ -150,13 +150,14 @@ Logic::Response Logic::_lock()
|
||||
Logic::Response Logic::_unlock()
|
||||
{
|
||||
_door.unlock();
|
||||
_state = UNLOCKED;
|
||||
_createNewToken(false);
|
||||
|
||||
if (_state == UNLOCKED)
|
||||
{
|
||||
_logger(LogLevel::warning, "Unable to unlock: already unlocked");
|
||||
return AlreadyUnlocked;
|
||||
} else {
|
||||
_state = UNLOCKED;
|
||||
}
|
||||
|
||||
return Success;
|
||||
|
Loading…
Reference in New Issue
Block a user