Extend the stream timeout

This commit is contained in:
Asim Aslam 2019-10-04 16:44:21 +01:00
parent cfb846ee7e
commit 86984a8a8a

View File

@ -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)