forked from j62/ctbrec
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:
parent
25e7c8a0ea
commit
9647f1160f
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue