Crash as soon as Tor closes the control connection.

This commit is contained in:
akwizgran
2022-07-06 15:38:23 +01:00
parent a5563ead28
commit 622683f45e
3 changed files with 9 additions and 2 deletions

View File

@@ -800,6 +800,13 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
}
}
@Override
public void controlConnectionClosed() {
if (state.isTorRunning()) {
throw new RuntimeException("Control connection closed");
}
}
private String removeSeverity(String msg) {
return msg.replaceFirst("[^ ]+ ", "");
}