Repository navigation
Commit d7b521a
committed
fix(data): re-check freshness after parse in value(); default missing at for older owners
Bug 1: value() did not re-check at vs fetchedAt after await parse, so a
concurrent offered() or value() that adopted a newer payload during the
yield was silently overwritten. Add the same post-parse guard offered()
already has (at <= entry.fetchedAt).
Bug 2: An older owner that predates the at field sends { t: 'value' }
without it. The receiver read message.at as undefined, making
hostDateNow() - undefined produce NaN, which poisoned fetchedAt and
rendered the entry unusable. Default to hostDateNow() so a missing
timestamp is treated as 'loaded just now'.1 parent 45b7b24 commit d7b521a
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
| 963 | + | |
963 | 964 | | |
964 | 965 | | |
965 | 966 | | |
| |||
1007 | 1008 | | |
1008 | 1009 | | |
1009 | 1010 | | |
1010 | | - | |
| 1011 | + | |
1011 | 1012 | | |
1012 | 1013 | | |
1013 | 1014 | | |
| |||
0 commit comments