forked from j62/ctbrec
1
0
Fork 0

Fix: Errors thrown by external browser

This hopefully fixes the errors, which popped up in the external browser, because
it tried to write to a closed socket.
This commit is contained in:
0xboobface 2019-04-05 14:50:45 +02:00
parent 25e7c8a0ea
commit 9647f1160f
1 changed files with 4 additions and 11 deletions

View File

@ -68,6 +68,10 @@ public class ExternalBrowser implements AutoCloseable {
p.waitFor();
int exitValue = p.exitValue();
p = null;
reader = null;
in = null;
out = null;
this.messageListener = null;
LOG.debug("Browser Process terminated with {}", exitValue);
} finally {
lock.unlock();
@ -117,17 +121,6 @@ public class ExternalBrowser implements AutoCloseable {
}
stopped = true;
executeJavaScript("quit");
if(socket != null) {
socket.close();
socket = null;
}
messageListener = null;
reader = null;
in = null;
out = null;
if(p != null) {
p.destroy();
}
}
private void readBrowserOutput() {