aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Pickering <alex@cogarr.net>2020-08-22 00:16:04 -0400
committerAlexander Pickering <alex@cogarr.net>2020-08-22 00:16:04 -0400
commit94f798fe243313f78f055a48267313e87afe2a67 (patch)
treebf1db332db73b4065d58f82805672cf7d0747355
parentbd934bfdea62c69aa3a85c275bd9bb355bbf4b82 (diff)
downloadlua-nng-94f798fe243313f78f055a48267313e87afe2a67.tar.gz
lua-nng-94f798fe243313f78f055a48267313e87afe2a67.tar.bz2
lua-nng-94f798fe243313f78f055a48267313e87afe2a67.zip
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.
-rw-r--r--src/lua-nng-aio.c2
1 files changed, 1 insertions, 1 deletions
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;