Commit 1dce282
Fix panic on send to closed event channel in Go SDK
Protect dispatchEvent with a recover guard so that a notification
arriving after Disconnect does not crash the process. Also wrap the
channel close in sync.Once so Disconnect is safe to call more than once.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent e320690 commit 1dce282
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
454 | 460 | | |
455 | 461 | | |
456 | 462 | | |
| |||
657 | 663 | | |
658 | 664 | | |
659 | 665 | | |
660 | | - | |
| 666 | + | |
661 | 667 | | |
662 | 668 | | |
663 | 669 | | |
| |||
0 commit comments