Fixed FTP crash when logging was disabled.

This commit is contained in:
Ziver Koc 2016-08-01 16:38:15 +02:00
parent f0f1bce3cf
commit 1ca18015ae
16 changed files with 184 additions and 157 deletions

View file

@ -165,8 +165,8 @@ public class UeControlExecutor implements Runnable{
currentlyActive = null;
}
}
synchronized (csvLogger) {
if (csvLogger != null) {
if (csvLogger != null) {
synchronized (csvLogger) {
csvLogger.flush();
csvLogger = null;
}
@ -248,11 +248,12 @@ public class UeControlExecutor implements Runnable{
downloadSpeed.setHandledData(0);
}
if (uploadSpeed.isUpdated()) {
synchronized (csvLogger) {
if (csvLogger != null)
if (csvLogger != null){
synchronized (csvLogger) {
csvLogger.write(getRunningBehaviour().getName(),
downloadSpeed.getBitThroughput(),
uploadSpeed.getBitThroughput());
}
}
if (throughputListener != null)
throughputListener.throughputUpdate(