From 94f798fe243313f78f055a48267313e87afe2a67 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 22 Aug 2020 00:16:04 -0400 Subject: Fix bug related to unlocking unlocked mutex Unlocking an unlocked mutex seems to result in undified behaviour, it was fine on windows but breaks on linux. --- src/lua-nng-aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lua-nng-aio.c b/src/lua-nng-aio.c index d8f20fd..707dbec 100644 --- a/src/lua-nng-aio.c +++ b/src/lua-nng-aio.c @@ -151,7 +151,7 @@ int lnng_aio_recv(lua_State *L){ /*printf("Freeing things\n");*/ nng_cv_free(cv); nng_mtx_free(callbackmtx); - nng_mtx_unlock(luamtx);//mutexes must not be locked when they are freed + //nng_mtx_unlock(luamtx);//mutexes must not be locked when they are freed nng_mtx_free(luamtx); /*printf("Done freeing everything, returning...\n");*/ return 1; -- cgit v1.2.3-70-g09d2