Commit a28f8f7
committed
fix(redis): publish INVALIDATE_PROFILE on transferClaimProfile for cross-server sync
The previous merge-branch security fix (aaad3bc) updated the local
cache + spatial index but didn't propagate the change to other
Redis-connected server instances. On a multi-server network, a market
sale on node A was invisible to node B until the next periodic cache
flush, so players on B would see the old owner.
Add INVALIDATE_PROFILE publishes for both branches:
- merge branch (buyer already has a profile): invalidate the source
owner's profile id AND the buyer's profile id
- re-key branch (no profile yet): invalidate the old and new owner ids
A small publishInvalidate() helper makes the null check + redis call
a one-liner. unclaimAllById doesn't need this — it delegates to
abandonProfile which already publishes INVALIDATE_PROFILE.1 parent 69485f5 commit a28f8f7
1 file changed
Lines changed: 16 additions & 2 deletions
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
725 | | - | |
| 725 | + | |
| 726 | + | |
726 | 727 | | |
727 | 728 | | |
728 | 729 | | |
729 | | - | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
730 | 735 | | |
731 | 736 | | |
732 | 737 | | |
733 | 738 | | |
734 | 739 | | |
735 | 740 | | |
736 | 741 | | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
737 | 745 | | |
738 | 746 | | |
739 | 747 | | |
740 | 748 | | |
741 | 749 | | |
742 | 750 | | |
743 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
744 | 758 | | |
745 | 759 | | |
746 | 760 | | |
| |||
0 commit comments