diff --git a/src/eALock.erl b/src/eALock.erl index a4141c1..baa35e2 100644 --- a/src/eALock.erl +++ b/src/eALock.erl @@ -96,7 +96,7 @@ loopTrys(KeyIxs, Keys, ALockRef, CurPid, PidInt, GLockMgrPid, MFAOrFun, TimeOut) LTimeOut = ?CASE(TimeOut == infinity, TimeOut, TimeOut - ?ReTryTime), case LTimeOut >= 0 of true -> - case tryLockAll(KeyIxs, PidInt, ALockRef, []) of + case tryLockAll(KeyIxs, ALockRef, PidInt, []) of ok -> try doApply(MFAOrFun) catch C:R:S -> diff --git a/src/eALockMgr.erl b/src/eALockMgr.erl index 9c539a7..bb6a9c4 100644 --- a/src/eALockMgr.erl +++ b/src/eALockMgr.erl @@ -36,7 +36,7 @@ handle_cast(_Request, State) -> handle_info({'EXIT', Pid, _Reason}, State) -> case ets:take(?EtsGLockPid, Pid) of [] -> ignore; - [KeyIxOrKeyIxs] -> + [{_Pid, KeyIxOrKeyIxs}] -> ALockRef = persistent_term:get(?eALockRef), PidInt = termInt:termInt(Pid), case is_integer(KeyIxOrKeyIxs) of