diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-08-22 18:19:21 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-08-22 18:19:21 +0400 |
commit | ed224e6a3530f54b5993e39066a8397d54e9517e (patch) | |
tree | 7c12b38c61b14fa9262e0b34c41418f156018d65 /src/lua/lua_http.c | |
parent | 233fba16ddb5346ade106b2a474cc4077b826082 (diff) | |
download | rspamd-ed224e6a3530f54b5993e39066a8397d54e9517e.tar.gz rspamd-ed224e6a3530f54b5993e39066a8397d54e9517e.zip |
Fix deadlock in lua HTTP bindings.
Diffstat (limited to 'src/lua/lua_http.c')
-rw-r--r-- | src/lua/lua_http.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index 8f85ebee1..3fa5da2ab 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -115,12 +115,12 @@ lua_http_push_error (gint code, struct lua_http_ud *ud) g_list_free (ud->headers); ud->headers = NULL; } - - ud->parser_state = 3; - remove_normal_event (ud->s, lua_http_fin, ud); if (need_unlock) { g_mutex_unlock (lua_mtx); } + ud->parser_state = 3; + remove_normal_event (ud->s, lua_http_fin, ud); + } static void @@ -175,10 +175,11 @@ lua_http_push_reply (f_str_t *in, struct lua_http_ud *ud) ud->headers = NULL; } - remove_normal_event (ud->s, lua_http_fin, ud); if (need_unlock) { g_mutex_unlock (lua_mtx); } + remove_normal_event (ud->s, lua_http_fin, ud); + } /* |