Skip to content

Commit ff99357

Browse files
authored
0.64.1
- Fix broker uri not being set before checkConfig.
2 parents 6014e15 + 60602b6 commit ff99357

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ subprojects {
55
apply plugin: 'maven'
66

77
group 'org.iot-dsa'
8-
version '0.64.0'
8+
version '0.64.1'
99

1010
targetCompatibility = JavaVersion.VERSION_1_8
1111
sourceCompatibility = JavaVersion.VERSION_1_8

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/protocol/v1/DS1LinkConnection.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ protected String getWsUri() {
6262

6363
protected void initializeConnection() {
6464
try {
65-
String uri = makeHandshakeUri();
66-
setBrokerUri(uri);
67-
debug(debug() ? "Broker URI " + uri : null);
65+
String uri = getBrokerUri();
6866
DSMap response = Json.read(connect(new URL(uri), 0), true).toMap();
6967
String s = response.getString("dsId");
7068
if (s == null) {
@@ -111,6 +109,13 @@ protected DSTransport makeTransport() {
111109
return transport;
112110
}
113111

112+
@Override
113+
protected void onStarted() {
114+
super.onStarted();
115+
setBrokerUri(makeHandshakeUri());
116+
debug(debug() ? "Broker URI " + getBrokerUri() : null);
117+
}
118+
114119
protected void setWsUri(String arg) {
115120
put(wsUri, DSString.valueOf(arg));
116121
}

0 commit comments

Comments
 (0)