From 8a1383a85a0e136ada5b5c7298c0346142f0c5b7 Mon Sep 17 00:00:00 2001 From: Anurag Ojha Date: Sun, 16 Nov 2025 19:09:37 +0000 Subject: [PATCH 1/4] fix-read-timout-dispatcher --- pkg/inmemorychannel/event_dispatcher.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/inmemorychannel/event_dispatcher.go b/pkg/inmemorychannel/event_dispatcher.go index 4f53c0ea7c0..a83a5320897 100644 --- a/pkg/inmemorychannel/event_dispatcher.go +++ b/pkg/inmemorychannel/event_dispatcher.go @@ -68,10 +68,13 @@ func (d *InMemoryEventDispatcher) WaitReady() { } func NewEventDispatcher(args *InMemoryEventDispatcherArgs) *InMemoryEventDispatcher { - // TODO set read timeouts? + bindingsReceiver := kncloudevents.NewHTTPEventReceiver( args.Port, - args.HTTPEventReceiverOptions..., + append( + args.HTTPEventReceiverOptions, + kncloudevents.WithReadTimeout(args.ReadTimeout), + )..., ) dispatcher := &InMemoryEventDispatcher{ From 3d4edc55cef98833a7abb816352445cd04ca4f9d Mon Sep 17 00:00:00 2001 From: Anurag Ojha Date: Tue, 18 Nov 2025 06:20:35 +0000 Subject: [PATCH 2/4] remove extra line --- pkg/inmemorychannel/event_dispatcher.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/inmemorychannel/event_dispatcher.go b/pkg/inmemorychannel/event_dispatcher.go index a83a5320897..2faf3e445a5 100644 --- a/pkg/inmemorychannel/event_dispatcher.go +++ b/pkg/inmemorychannel/event_dispatcher.go @@ -68,7 +68,6 @@ func (d *InMemoryEventDispatcher) WaitReady() { } func NewEventDispatcher(args *InMemoryEventDispatcherArgs) *InMemoryEventDispatcher { - bindingsReceiver := kncloudevents.NewHTTPEventReceiver( args.Port, append( From d8a3a453a0f7043879464a9d639e397de487fd94 Mon Sep 17 00:00:00 2001 From: Anurag Ojha Date: Fri, 21 Nov 2025 11:26:17 +0000 Subject: [PATCH 3/4] reverse the logic --- pkg/inmemorychannel/event_dispatcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/inmemorychannel/event_dispatcher.go b/pkg/inmemorychannel/event_dispatcher.go index 2faf3e445a5..bf405f59d78 100644 --- a/pkg/inmemorychannel/event_dispatcher.go +++ b/pkg/inmemorychannel/event_dispatcher.go @@ -71,8 +71,8 @@ func NewEventDispatcher(args *InMemoryEventDispatcherArgs) *InMemoryEventDispatc bindingsReceiver := kncloudevents.NewHTTPEventReceiver( args.Port, append( - args.HTTPEventReceiverOptions, kncloudevents.WithReadTimeout(args.ReadTimeout), + args.HTTPEventReceiverOptions, )..., ) From a75fa6438a4d4b1b3455474f0135577e7687f1dd Mon Sep 17 00:00:00 2001 From: Anurag Ojha Date: Fri, 21 Nov 2025 13:04:18 +0000 Subject: [PATCH 4/4] fix building error --- pkg/inmemorychannel/event_dispatcher.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/inmemorychannel/event_dispatcher.go b/pkg/inmemorychannel/event_dispatcher.go index bf405f59d78..029c7a14a4a 100644 --- a/pkg/inmemorychannel/event_dispatcher.go +++ b/pkg/inmemorychannel/event_dispatcher.go @@ -71,9 +71,10 @@ func NewEventDispatcher(args *InMemoryEventDispatcherArgs) *InMemoryEventDispatc bindingsReceiver := kncloudevents.NewHTTPEventReceiver( args.Port, append( - kncloudevents.WithReadTimeout(args.ReadTimeout), - args.HTTPEventReceiverOptions, - )..., + []kncloudevents.HTTPEventReceiverOption{ + kncloudevents.WithReadTimeout(args.ReadTimeout), + }, + args.HTTPEventReceiverOptions...)..., ) dispatcher := &InMemoryEventDispatcher{