mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Remove torSetup.cleanupTorFiles() call.
This has caused the slow tor startup of about 20-30 sec. Without that it is about 5 sec.
This commit is contained in:
parent
c0f981ad1d
commit
87bf30b98c
3 changed files with 1 additions and 11 deletions
|
@ -260,7 +260,6 @@ public class BisqSetup {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void step2() {
|
private void step2() {
|
||||||
torSetup.cleanupTorFiles();
|
|
||||||
readMapsFromResources(this::step3);
|
readMapsFromResources(this::step3);
|
||||||
checkForCorrectOSArchitecture();
|
checkForCorrectOSArchitecture();
|
||||||
checkOSXVersion();
|
checkOSXVersion();
|
||||||
|
|
|
@ -46,15 +46,7 @@ public class TorSetup {
|
||||||
this.torDir = checkDir(torDir);
|
this.torDir = checkDir(torDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cleanupTorFiles() {
|
// Should only be called if needed. Slows down Tor startup from about 5 sec. to 30 sec. if it gets deleted.
|
||||||
cleanupTorFiles(null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
// We get sometimes Tor startup problems which is related to some tor files in the tor directory. It happens
|
|
||||||
// more often if the application got killed (not graceful shutdown).
|
|
||||||
// Creating all tor files newly takes about 3-4 sec. longer and it does not benefit from cache files.
|
|
||||||
// TODO: We should fix those startup problems in the netlayer library, once fixed there we can remove that call at the
|
|
||||||
// Bisq startup again.
|
|
||||||
public void cleanupTorFiles(@Nullable Runnable resultHandler, @Nullable ErrorMessageHandler errorMessageHandler) {
|
public void cleanupTorFiles(@Nullable Runnable resultHandler, @Nullable ErrorMessageHandler errorMessageHandler) {
|
||||||
File hiddenservice = new File(Paths.get(torDir.getAbsolutePath(), "hiddenservice").toString());
|
File hiddenservice = new File(Paths.get(torDir.getAbsolutePath(), "hiddenservice").toString());
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -73,7 +73,6 @@ public class AppSetupWithP2P extends AppSetup {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initPersistedDataHosts() {
|
public void initPersistedDataHosts() {
|
||||||
torSetup.cleanupTorFiles();
|
|
||||||
persistedDataHosts.add(p2PService);
|
persistedDataHosts.add(p2PService);
|
||||||
|
|
||||||
// we apply at startup the reading of persisted data but don't want to get it triggered in the constructor
|
// we apply at startup the reading of persisted data but don't want to get it triggered in the constructor
|
||||||
|
|
Loading…
Add table
Reference in a new issue