1
0
mirror of https://github.com/bettercap/bettercap.git synced 2025-03-12 04:36:03 -07:00

fix: using non blocking channel write ops in order not to spawn too many go routines and fill the stack (fixes )

This commit is contained in:
evilsocket 2018-01-17 17:13:25 +01:00
parent 4f1c508a7c
commit 79130e2669

@ -59,7 +59,10 @@ func (p *EventPool) Add(tag string, data interface{}) {
e := NewEvent(tag, data)
p.events = append([]Event{e}, p.events...)
go func() { p.NewEvents <- e }()
select {
case p.NewEvents <- e:
default:
}
}
func (p *EventPool) Log(level int, format string, args ...interface{}) {