mirror of
https://github.com/bol-van/zapret2.git
synced 2026-10-29 06:02:05 +00:00
zapret-pcap: move file:close
This commit is contained in:
1 parent
efcc1477dd
commit
0430d9d9cd
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
Reference in new issue
Block a user