mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: increased events backlog for events.stream listener channels (fixes #187)
This commit is contained in:
parent
8cbc0330f3
commit
eb0ca12ec6
1 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,7 @@ func NewEventPool(debug bool, silent bool) *EventPool {
|
|||
func (p *EventPool) Listen() <-chan Event {
|
||||
p.Lock()
|
||||
defer p.Unlock()
|
||||
l := make(chan Event, 1)
|
||||
l := make(chan Event, 255)
|
||||
p.listeners = append(p.listeners, l)
|
||||
return l
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ func (p *EventPool) Add(tag string, data interface{}) {
|
|||
select {
|
||||
case l <- e:
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "Message not sent!\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue