(crawler) Fix resource leak in crawler

A 10 MB thread local buffer wasn't static.  Oops.
This commit is contained in:
Viktor Lofgren 2023-12-27 16:32:17 +01:00
parent 9707366348
commit f811a29f87

View file

@ -37,7 +37,7 @@ public class WarcRecorder implements AutoCloseable {
private final Path warcFile;
private static final Logger logger = LoggerFactory.getLogger(WarcRecorder.class);
private final ThreadLocal<byte[]> bufferThreadLocal = ThreadLocal.withInitial(() -> new byte[MAX_SIZE]);
private final static ThreadLocal<byte[]> bufferThreadLocal = ThreadLocal.withInitial(() -> new byte[MAX_SIZE]);
private boolean temporaryFile = false;