Commit 67bd4ce5 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Recovery logic if an error occured while creating audit file. JM-580

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3498 b35dd754-fafc-0310-a699-88a17e54d16e
parent 2bcdd8d7
......@@ -13,12 +13,12 @@ package org.jivesoftware.wildfire.audit.spi;
import org.dom4j.DocumentFactory;
import org.dom4j.Element;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log;
import org.jivesoftware.wildfire.Session;
import org.jivesoftware.wildfire.audit.AuditManager;
import org.jivesoftware.wildfire.audit.Auditor;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.JiveGlobals;
import org.xmpp.packet.IQ;
import org.xmpp.packet.Message;
import org.xmpp.packet.Packet;
......@@ -26,8 +26,8 @@ import org.xmpp.packet.Presence;
import java.io.*;
import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
public class AuditorImpl implements Auditor {
......@@ -108,7 +108,7 @@ public class AuditorImpl implements Auditor {
}
private void prepareAuditFile() throws IOException {
if (currentAuditFile == null || currentAuditFile.length() > maxSize) {
if (currentAuditFile == null || currentAuditFile.length() > maxSize || xmlWriter == null) {
rotateFiles();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment