Skip to content

Commit 16d3548

Browse files
fix: cleaning the node with services list only after evaluating the node service provider
1 parent bbf9472 commit 16d3548

File tree

1 file changed

+7
-1
lines changed
  • src/main/java/reputation/node/models

1 file changed

+7
-1
lines changed

src/main/java/reputation/node/models/Node.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,13 @@ public void useNodeService() {
329329
this.setRequestingNodeServices(false);
330330
this.setLastNodeServiceTransactionType(null);
331331
}
332+
333+
try {
334+
this.mutexNodesServices.lock();
335+
this.nodesWithServices.clear();
336+
} finally {
337+
this.mutexNodesServices.unlock();
338+
}
332339
}
333340
}
334341

@@ -1142,7 +1149,6 @@ public void update(Object object, Object object2) {
11421149
if (receivedTransaction.getType() == expectedTransactionType) {
11431150
try {
11441151
this.mutexNodesServices.lock();
1145-
this.nodesWithServices.clear();
11461152
this.nodesWithServices.add(receivedTransaction);
11471153
} finally {
11481154
this.mutexNodesServices.unlock();

0 commit comments

Comments
 (0)