fixed npe in tag writer
This commit is contained in:
parent
cce12af766
commit
ad9b9b9096
|
@ -23,8 +23,12 @@ public class TagWriter {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
AbstractStanza output = writeQueue.take();
|
AbstractStanza output = writeQueue.take();
|
||||||
|
if (outputStream==null) {
|
||||||
|
shouldStop = true;
|
||||||
|
} else {
|
||||||
outputStream.write(output.toString());
|
outputStream.write(output.toString());
|
||||||
outputStream.flush();
|
outputStream.flush();
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
shouldStop = true;
|
shouldStop = true;
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|
Loading…
Reference in New Issue