Skip to content

Commit 03d2f3b

Browse files
committed
fix: init last access timestamp of nodes to current time
- Initialize every node's last access timestamp to the current time to avoid null referencing when checking for healthcheck due status
1 parent 27bacf7 commit 03d2f3b

File tree

1 file changed

+1
-0
lines changed
  • src/main/java/org/typesense/resources

1 file changed

+1
-0
lines changed

src/main/java/org/typesense/resources/Node.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public Node(String protocol, String host, String port) {
2525
this.host = host;
2626
this.port = port;
2727
this.isHealthy = true;
28+
this.lastAccessTimestamp = LocalDateTime.now();
2829

2930
if (protocol == null) {
3031
throw new RuntimeException("Protocol cannot be null");

0 commit comments

Comments
 (0)