File tree 1 file changed +3
-1
lines changed
logback-core/src/main/java/ch/qos/logback/core 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ public void stop() {
136
136
protected void closeOutputStream () {
137
137
if (this .outputStream != null ) {
138
138
try {
139
- // before closing we have to output out layout 's footer
139
+ // before closing we have to output out encooder 's footer
140
140
encoderClose ();
141
141
this .outputStream .close ();
142
142
this .outputStream = null ;
@@ -204,6 +204,8 @@ private void writeBytes(byte[] byteArray) throws IOException {
204
204
streamWriteLock .lock ();
205
205
206
206
try {
207
+ // guard against appender having been stop() in parallel
208
+ // note that the encoding step is performed outside the protection of the streamWriteLock
207
209
if (isStarted ()) {
208
210
writeByteArrayToOutputStreamWithPossibleFlush (byteArray );
209
211
updateByteCount (byteArray );
You can’t perform that action at this time.
0 commit comments