diff --git a/pkg/bus/memory/event_dispatcher.go b/pkg/bus/memory/event_dispatcher.go index fd789f8..5fc028d 100644 --- a/pkg/bus/memory/event_dispatcher.go +++ b/pkg/bus/memory/event_dispatcher.go @@ -1,12 +1,9 @@ package memory import ( - "context" "sync" - "time" "forge.cadoles.com/arcad/edge/pkg/bus" - "gitlab.com/wpetit/goweb/logger" ) type eventDispatcherSet struct { @@ -89,8 +86,6 @@ func (d *eventDispatcher) IsOut(out <-chan bus.Message) bool { } func (d *eventDispatcher) Run() { - ctx := context.Background() - for { msg, ok := <-d.in if !ok { @@ -99,12 +94,7 @@ func (d *eventDispatcher) Run() { return } - timeout := time.After(2 * time.Second) - select { - case d.out <- msg: - case <-timeout: - logger.Error(ctx, "message out chan timed out", logger.F("message", msg)) - } + d.out <- msg } }