io/router: don't clear event queue before cancel events

There may be unrelated events in the queue, so it's not appropriate
to clear the queue just because an input Cancel event occurs.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-06-07 18:20:18 +02:00
parent d86f96503f
commit d280d438c7
3 changed files with 2 additions and 8 deletions
-6
View File
@@ -137,12 +137,6 @@ func (h *handlerEvents) init() {
}
}
func (h *handlerEvents) Set(k event.Tag, evts []event.Event) {
h.init()
h.handlers[k] = evts
h.hadEvents = true
}
func (h *handlerEvents) Add(k event.Tag, e event.Event) {
h.init()
h.handlers[k] = append(h.handlers[k], e)