mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-21 01:15:50 +00:00
This closes #2740
This commit is contained in:
commit
072e9b467a
@ -361,6 +361,8 @@ final class MappedSequentialFile implements SequentialFile {
|
||||
@Override
|
||||
public void close(boolean waitOnSync) {
|
||||
if (this.mappedFile != null) {
|
||||
if (factory.isDatasync())
|
||||
this.mappedFile.force();
|
||||
this.mappedFile.close();
|
||||
this.mappedFile = null;
|
||||
}
|
||||
|
@ -135,6 +135,8 @@ public class NIOSequentialFile extends AbstractSequentialFile {
|
||||
|
||||
try {
|
||||
if (channel != null) {
|
||||
if (factory.isDatasync())
|
||||
channel.force(false);
|
||||
channel.close();
|
||||
}
|
||||
} catch (ClosedChannelException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user