Merge pull request #3355 from Ace-Tang/avoid-start-hang
Add timeout in load shim v2
This commit is contained in:
commit
4355a2accc
@ -100,6 +100,8 @@ func loadShim(ctx context.Context, bundle *Bundle, events *exchange.Exchange, rt
|
||||
events: events,
|
||||
rtTasks: rt,
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
||||
defer cancel()
|
||||
if err := s.Connect(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user