Skip to content

Commit e316bb3

Browse files
committed
extract constant
1 parent 5737a58 commit e316bb3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/inmemorychannel/event_dispatcher.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,13 @@ func (d *InMemoryEventDispatcher) WaitReady() {
6969

7070
func NewEventDispatcher(args *InMemoryEventDispatcherArgs) *InMemoryEventDispatcher {
7171
readTimeout := args.ReadTimeout
72+
const DefaultReadTimeout = 30 * time.Second
73+
7274
if readTimeout <= 0 {
73-
readTimeout = 30 * time.Second
75+
readTimeout = DefaultReadTimeout
7476
}
7577

78+
7679
bindingsReceiver := kncloudevents.NewHTTPEventReceiver(
7780
args.Port,
7881
append(args.HTTPEventReceiverOptions,

0 commit comments

Comments
 (0)