Improved GUI response time

The GUI reponds faster to the start and stop action when using the
RemoteRecorder
This commit is contained in:
0xboobface 2018-07-06 21:15:12 +02:00
parent b88803e30c
commit 8c7385229f
1 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,12 @@ public class RemoteRecorder implements Recorder {
if(!resp.status.equals("success")) {
throw new IOException("Server returned error " + resp.status + " " + resp.msg);
}
if("start".equals(action)) {
models.add(model);
} else {
models.remove(model);
}
} else {
throw new IOException("Server returned error. HTTP status: " + response.code());
}