http upload: do not crash on invalid slot responses

This commit is contained in:
Daniel Gultsch 2018-02-11 17:54:59 +01:00
parent e2ac1db225
commit 64928d0ff1
1 changed files with 7 additions and 5 deletions

View File

@ -145,11 +145,11 @@ public class HttpUploadConnection implements Transferable {
}
}
}
if (!canceled) {
new Thread(this::upload).start();
}
return;
}
if (!canceled) {
new Thread(this::upload).start();
}
return;
} catch (MalformedURLException e) {
//fall through
}
@ -229,7 +229,9 @@ public class HttpUploadConnection implements Transferable {
if (connection != null) {
connection.disconnect();
}
wakeLock.release();
if (wakeLock.isHeld()) {
wakeLock.release();
}
}
}
}