Fix: nullpointerexception

This commit is contained in:
Laurent Clouet
2020-01-12 14:37:30 +01:00
parent 99d717634b
commit 53663a6933
2 changed files with 13 additions and 7 deletions

View File

@@ -387,12 +387,14 @@ public class Client {
if (this.server == null) {
return 0;
}
try {
this.server.HTTPRequest(this.server.getPage("logout"));
}
catch (IOException e) {
// nothing to do: if the logout failed that's ok
if (this.server.getPage("logout").isEmpty() == false) {
try {
this.server.HTTPRequest(this.server.getPage("logout"));
}
catch (IOException e) {
// nothing to do: if the logout failed that's ok
}
}
this.server.interrupt();
try {