Skip to content

Commit cb873db

Browse files
committed
Amend default node config to allow users to override event bus flags
1 parent 81612e8 commit cb873db

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

java/src/org/openqa/selenium/events/zeromq/ZeroMqEventBus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static EventBus create(Config config) {
6363
return mungeUri(uri, "tcp", 4442);
6464
});
6565

66-
String subscribe = config.get(EVENTS_SECTION, "publish")
66+
String subscribe = config.get(EVENTS_SECTION, "subscribe")
6767
.orElseGet(() -> {
6868
URI uri = config.get("node", "hub-address")
6969
.map(Urls::from)

java/src/org/openqa/selenium/grid/node/httpd/DefaultNodeConfig.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ class DefaultNodeConfig extends MapConfig {
2525

2626
DefaultNodeConfig() {
2727
super(ImmutableMap.of(
28-
"events", ImmutableMap.of(
29-
"publish", "tcp://*:4442",
30-
"subscribe", "tcp://*:4443"),
28+
"node", ImmutableMap.of(
29+
// We use this instead of setting the default ports for
30+
// the publish and subscribe ports of the event bus so
31+
// that people can use the `--hub` flag safely.
32+
"hub-address", "http://0.0.0.0:4444"
33+
),
3134
"server", ImmutableMap.of(
3235
"port", 5555)));
3336
}

0 commit comments

Comments
 (0)