Skip to content

Commit 4355a2a

Browse files
authored
Merge pull request #3355 from Ace-Tang/avoid-start-hang
Add timeout in load shim v2
2 parents 434f69e + 95f9bbf commit 4355a2a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

runtime/v2/shim.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ func loadShim(ctx context.Context, bundle *Bundle, events *exchange.Exchange, rt
100100
events: events,
101101
rtTasks: rt,
102102
}
103+
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
104+
defer cancel()
103105
if err := s.Connect(ctx); err != nil {
104106
return nil, err
105107
}

0 commit comments

Comments
 (0)