Commit c8fac51
Fix internalDestroy causing node crash
When the ForwardClose times out, CIPConnectionLayer.js calls this.destroy('Forward Close error'). That goes into internalDestroy, which iterates pending callbacks. One of them is the very same disconnect callback. Inside that callback, this.destroy(...) is called again, and because clear() happens after forEach, the map still contains the same callback, so it re-enters infinitely.
internalDestroy now clears the callback map before invoking, breaking the recursion.1 parent 808713b commit c8fac51
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
0 commit comments