mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +00:00
(index) Correct strange close handling of PositionsFileConstructor
This commit is contained in:
parent
934af0dd4b
commit
6e47eae903
@ -63,9 +63,11 @@ public class PositionsFileConstructor implements AutoCloseable {
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
while (workBuffer.position() < workBuffer.limit()) {
|
||||
if (workBuffer.hasRemaining()) {
|
||||
workBuffer.flip();
|
||||
channel.write(workBuffer);
|
||||
|
||||
while (workBuffer.hasRemaining())
|
||||
channel.write(workBuffer);
|
||||
}
|
||||
|
||||
channel.force(false);
|
||||
|
Loading…
Reference in New Issue
Block a user