]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Merge branch 'master' into coroutines-tcp
authorMikhail Galanin <mgalanin@mimecast.com>
Fri, 31 Aug 2018 08:52:56 +0000 (09:52 +0100)
committerMikhail Galanin <mgalanin@mimecast.com>
Fri, 31 Aug 2018 08:52:56 +0000 (09:52 +0100)
1  2 
src/lua/lua_tcp.c

index 851605be1380875826d00fdce53dc89cc3f43c1f,ce91d78735cc03fdbfb71f54698cdca0702aef49..6b6c32773fc030b1cc9341b56e616368a549cc20
@@@ -401,8 -257,8 +401,8 @@@ lua_tcp_shift_handler (struct lua_tcp_c
                        g_free (hdl->h.r.stop_pattern);
                }
        }
 -      else {
 +      else if (hdl->type == LUA_WANT_WRITE) {
-               if (hdl->h.w.cbref) {
+               if (hdl->h.w.cbref && hdl->h.w.cbref != -1) {
                        luaL_unref (cbd->task->cfg->lua_state, LUA_REGISTRYINDEX, hdl->h.w.cbref);
                }