Skip to content

Commit

Permalink
fix: #15 should close chan after AwaitFire
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Aug 14, 2021
1 parent ee4f2ed commit f93466b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (em *Manager) addListenerItem(name string, li *ListenerItem) {
* Listener Manage: - trigger event
*************************************************************/

// Trigger alias of the method MustFire()
// MustTrigger alias of the method MustFire()
func (em *Manager) MustTrigger(name string, params M) Event {
return em.MustFire(name, params)
}
Expand Down Expand Up @@ -192,6 +192,7 @@ func (em *Manager) AwaitFire(e Event) (err error) {
}(e)

err = <-ch
close(ch)
return
}

Expand Down

0 comments on commit f93466b

Please sign in to comment.