Commit ccd892f
fix(node): expose subscriptions on ClientNodeInteraction wrapper (#3694)
CommissioningClient assigns `node.interaction as ClientInteraction` to
`peer.interaction`, but `node.interaction` is a `ClientNodeInteraction`
wrapper that did not expose `subscriptions`. PeerAddressMonitor's
address-migration path then dereferenced `interaction.subscriptions`,
crashing with "Cannot read properties of undefined (reading
'closeForPeer')" whenever a session migrated to a discovered IP.
Add a `subscriptions` getter on `ClientNodeInteraction` that resolves
the singleton from the node environment, matching what the inner
`ClientInteraction` returns. Tighten `ClientInteraction.environment`
from `protected` to `#environment` since no subclass needs it.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 43d0df6 commit ccd892f
2 files changed
Lines changed: 8 additions & 3 deletions
File tree
- packages
- node/src/node/client
- protocol/src/action/client
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
0 commit comments