Skip to content

Commit

Permalink
ETS: fix recently introduced bug wrt. table deletion after failed tra…
Browse files Browse the repository at this point in the history
…nsfer.
  • Loading branch information
esstrifork committed Jan 27, 2014
1 parent a83287f commit 85e68b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/erjang/m/ets/ETable.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,13 @@ public void transfer_ownership_to(EInternalPID new_owner, EObject transfer_data)
former_owner,
transfer_data);

//TODO: Remove exit hook from old process
this.owner = new WeakReference<EProc>(new_owner_task);
new_owner_task.add_exit_hook(this);
former_owner.remove_exit_hook(this);

new_owner.send(former_owner, msg);
} else {
delete();
}
}

Expand Down

0 comments on commit 85e68b0

Please sign in to comment.