Commit 63fa161
committed
fix(react): detach Krisp processor on cancel
If the effect was cancelled while `track.setProcessor(processor)` was
still in flight — e.g. the component unmounted with the track still
alive via a caller-owned `trackRef` — setProcessor could resolve
after the bailout, leaving the track with a Krisp processor attached
that the hook no longer manages. When the track outlives the hook
nothing was going to clean that up.
Tear down the attachment inside the IIFE at each post-setProcessor
cancellation check, so the track is left in the state the hook found
it in.1 parent 60a7d50 commit 63fa161
1 file changed
Lines changed: 12 additions & 2 deletions
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
104 | 111 | | |
105 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
106 | 116 | | |
107 | 117 | | |
108 | 118 | | |
| |||
0 commit comments