Extend the stream timeout
This commit is contained in:
parent
cfb846ee7e
commit
86984a8a8a
@ -65,7 +65,7 @@ func (b *serviceBroker) Subscribe(topic string, handler broker.Handler, opts ...
|
|||||||
stream, err := b.Client.Subscribe(context.TODO(), &pb.SubscribeRequest{
|
stream, err := b.Client.Subscribe(context.TODO(), &pb.SubscribeRequest{
|
||||||
Topic: topic,
|
Topic: topic,
|
||||||
Queue: options.Queue,
|
Queue: options.Queue,
|
||||||
}, client.WithAddress(b.Addrs...))
|
}, client.WithAddress(b.Addrs...), client.WithRequestTimeout(time.Hour))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -93,7 +93,7 @@ func (b *serviceBroker) Subscribe(topic string, handler broker.Handler, opts ...
|
|||||||
stream, err := b.Client.Subscribe(context.TODO(), &pb.SubscribeRequest{
|
stream, err := b.Client.Subscribe(context.TODO(), &pb.SubscribeRequest{
|
||||||
Topic: topic,
|
Topic: topic,
|
||||||
Queue: options.Queue,
|
Queue: options.Queue,
|
||||||
}, client.WithAddress(b.Addrs...))
|
}, client.WithAddress(b.Addrs...), client.WithRequestTimeout(time.Hour))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debugf("Failed to resubscribe to topic %s: %v", topic, err)
|
log.Debugf("Failed to resubscribe to topic %s: %v", topic, err)
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user