mirror of
https://github.com/turbot/steampipe.git
synced 2026-02-22 23:00:16 -05:00
Fix ctrl+c during dashboard execution causing a "panic: send on closed channel". Closes #2048
This commit is contained in:
@@ -13,8 +13,10 @@ import (
|
||||
)
|
||||
|
||||
func (w *Workspace) PublishDashboardEvent(e dashboardevents.DashboardEvent) {
|
||||
// send an event onto the event bus
|
||||
w.dashboardEventChan <- e
|
||||
if w.dashboardEventChan != nil {
|
||||
// send an event onto the event bus
|
||||
w.dashboardEventChan <- e
|
||||
}
|
||||
}
|
||||
|
||||
// RegisterDashboardEventHandler starts the event handler goroutine if necessary and
|
||||
@@ -34,6 +36,7 @@ func (w *Workspace) handleDashboardEvent() {
|
||||
for {
|
||||
e := <-w.dashboardEventChan
|
||||
if e == nil {
|
||||
w.dashboardEventChan = nil
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user