mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 14:03:17 -07:00
new: implemented api.rest.record and api.rest.replay
This commit is contained in:
parent
4713d25ea7
commit
0a31ac8167
76 changed files with 7610 additions and 48 deletions
|
@ -111,7 +111,16 @@ func (p *EventPool) Add(tag string, data interface{}) {
|
|||
|
||||
// broadcast the event to every listener
|
||||
for _, l := range p.listeners {
|
||||
l <- e
|
||||
// do not block!
|
||||
go func(ch *chan Event) {
|
||||
// channel might be closed
|
||||
defer func() {
|
||||
if recover() != nil {
|
||||
|
||||
}
|
||||
}()
|
||||
*ch <- e
|
||||
}(&l)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue