Add a sync to deal with the issue filip reported in the 5.5.x status file
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@786483
13f79535-47bb-0310-9956-
ffa450edef68
* The system time when we last updated the Date that this valve
* uses for log lines.
*/
- private Date currentDate = null;
+ private volatile Date currentDate = null;
private volatile long currentMillis = 0;
}
// Log this message
- if (writer != null) {
- writer.println(message);
- if (!buffered) {
- writer.flush();
+ synchronized(this) {
+ if (writer != null) {
+ writer.println(message);
+ if (!buffered) {
+ writer.flush();
+ }
}
}