Skip to content

Commit 1b1f803

Browse files
fix: NPE on shutdown
If the cluster weight is zero we don't add oursevles to the table, shutdown was not accounting for this. GitOrigin-RevId: f4912d72993e15de066459150e23c7438ad62718
1 parent 9794cc0 commit 1b1f803

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

misk-clustering-dynamodb/src/main/kotlin/misk/clustering/dynamo/DynamoClusterWatcherTask.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ internal class DynamoClusterWatcherTask @Inject constructor(
106106
.partitionValue(self)
107107
.build()
108108
)
109-
table.deleteItem(member)
109+
if (member != null) {
110+
table.deleteItem(member)
111+
}
110112
}
111113

112114
companion object {

0 commit comments

Comments
 (0)