From 0430d9d9cdeef887a290f93efd3fb9fd91450624 Mon Sep 17 00:00:00 2001 From: bol-van Date: Wed, 24 Dec 2025 16:16:34 +0300 Subject: [PATCH] zapret-pcap: move file:close --- lua/zapret-pcap.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/zapret-pcap.lua b/lua/zapret-pcap.lua index b934b86..5419169 100644 --- a/lua/zapret-pcap.lua +++ b/lua/zapret-pcap.lua @@ -6,7 +6,6 @@ function pcap_write_packet(file, raw) local sec, nsec = clock_gettime(); file:write(bu32(sec)..bu32(nsec)..bu32(#raw)..bu32(#raw)) file:write(raw) - file:close() end function pcap_write(file, raw) local pos = file:seek() @@ -36,4 +35,5 @@ function pcap(ctx, desync) error("pcap: could not write to '".._G[fn_cache_name].."'") end pcap_write(f, raw_packet(ctx)) + f:close() end