Skip to content

Commit 1fa900f

Browse files
authored
0.79.0
- Coalesce database saves. - Sync file descriptor on database save. - Minor threading fixes in lists and subscriptions.
1 parent 10a268b commit 1fa900f

File tree

4 files changed

+462
-420
lines changed

4 files changed

+462
-420
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ subprojects {
44
apply plugin: 'maven-publish'
55

66
group 'org.iot-dsa'
7-
version '0.78.0'
7+
version '0.79.0'
88

99
targetCompatibility = JavaVersion.VERSION_1_8
1010
sourceCompatibility = JavaVersion.VERSION_1_8

dslink-v2/src/main/java/com/acuity/iot/dsa/dslink/protocol/responder/DSInboundList.java

+10-6
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ public boolean canWrite(DSSession session) {
7272

7373
@Override
7474
public void close() {
75-
if (isOpen()) {
76-
//we don't actually close the stream because an object could be added back at this path
77-
send("$disconnectedTs", DSDateTime.now().toElement());
78-
sendStreamOpen = true;
79-
state = StreamState.DISCONNECTED;
80-
}
8175
if (subscription != null) {
8276
subscription.close();
8377
subscription = null;
@@ -90,6 +84,12 @@ public void close() {
9084
}
9185
response = null;
9286
}
87+
if (isOpen()) {
88+
//we don't actually close the stream because an object could be added back at this path
89+
send("$disconnectedTs", DSDateTime.now().toElement());
90+
sendStreamOpen = true;
91+
state = StreamState.DISCONNECTED;
92+
}
9393
}
9494

9595
@Override
@@ -152,6 +152,10 @@ public void onEvent(DSEvent event, DSNode node, DSInfo<?> child, DSIValue data)
152152
}
153153
break;
154154
case DSNode.VALUE_CHANGED:
155+
if (child == null) {
156+
// The node is a value node and this will be repeated for the parent.
157+
return;
158+
}
155159
char ch = child.getName().charAt(0);
156160
if ((ch == '@') || (ch == '$')) {
157161
send(child.getName(), child.getElement());

0 commit comments

Comments
 (0)