From: Mikhail Galanin Date: Fri, 31 Aug 2018 08:52:56 +0000 (+0100) Subject: Merge branch 'master' into coroutines-tcp X-Git-Tag: 1.8.0~187^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bad44f28f5b25218d92619cca8e2d54559e3ec31;p=thirdparty%2Frspamd.git Merge branch 'master' into coroutines-tcp --- bad44f28f5b25218d92619cca8e2d54559e3ec31 diff --cc src/lua/lua_tcp.c index 851605be13,ce91d78735..6b6c32773f --- a/src/lua/lua_tcp.c +++ b/src/lua/lua_tcp.c @@@ -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); }