aboutsummaryrefslogtreecommitdiff
path: root/src/core/objhash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/objhash.c')
-rw-r--r--src/core/objhash.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/objhash.c b/src/core/objhash.c
index 18c55f83..acdcd2c3 100644
--- a/src/core/objhash.c
+++ b/src/core/objhash.c
@@ -316,6 +316,8 @@ nni_objhash_unref_wait(nni_objhash *oh, uint32_t id)
while (node->on_refcnt != 1) {
nni_cv_wait(&oh->oh_cv);
+ // If the table resizes, it can invalidate our old node.
+ node = nni_objhash_find_node(oh, id);
}
node->on_refcnt--;
NNI_ASSERT(node->on_refcnt == 0);