check for return from the queue
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 14 Sep 2009 20:48:12 +0000 (20:48 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 14 Sep 2009 20:48:12 +0000 (20:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@814841 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/juli/AsyncFileHandler.java

index ece00e9..026112f 100644 (file)
@@ -124,7 +124,7 @@ public class AsyncFileHandler extends FileHandler {
             while (run) {
                 try {
                     LogEntry entry = queue.poll(LOGGER_SLEEP_TIME, TimeUnit.MILLISECONDS);
-                    entry.flush();
+                    if (entry!=null) entry.flush();
                 }catch (InterruptedException x) {
                     Thread.interrupted();
                 }catch (Exception x) {