mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
WIP: Debug Tor crash when spamming the control port.
This commit is contained in:
@@ -49,7 +49,6 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
@@ -298,17 +297,11 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
|
|||||||
private void spamControlPort() {
|
private void spamControlPort() {
|
||||||
ioExecutor.execute(() -> {
|
ioExecutor.execute(() -> {
|
||||||
LOG.info("Spamming control port");
|
LOG.info("Spamming control port");
|
||||||
Random random = new Random();
|
|
||||||
try {
|
try {
|
||||||
//noinspection InfiniteLoopStatement
|
//noinspection InfiniteLoopStatement
|
||||||
while (true) {
|
for (boolean bridges = true; ; bridges = !bridges) {
|
||||||
boolean bridges = random.nextBoolean();
|
LOG.info("Enable bridges " + bridges);
|
||||||
boolean meek = random.nextBoolean();
|
enableBridges(bridges, false);
|
||||||
boolean network = random.nextBoolean();
|
|
||||||
LOG.info("Enable bridges " + bridges + ", meek " + meek
|
|
||||||
+ ", network " + network);
|
|
||||||
enableBridges(bridges, meek);
|
|
||||||
enableNetwork(network);
|
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logException(LOG, WARNING, e);
|
logException(LOG, WARNING, e);
|
||||||
|
|||||||
Reference in New Issue
Block a user