fix: increased events backlog for events.stream listener channels (fixes #187)

This commit is contained in:
evilsocket 2018-03-19 11:44:30 +01:00
commit eb0ca12ec6
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -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")
}
}
}