From 3bd9ca260be87a7fc504911a2447e3411e7ae323 Mon Sep 17 00:00:00 2001 From: lucian Date: Wed, 22 Dec 2021 07:55:45 +0200 Subject: [PATCH] remove subscribe timeout (#33) --- pkg/messaging/nats/nats.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/messaging/nats/nats.go b/pkg/messaging/nats/nats.go index 621c059..14eb346 100644 --- a/pkg/messaging/nats/nats.go +++ b/pkg/messaging/nats/nats.go @@ -241,9 +241,9 @@ func (n *natsStreamingPubSub) Subscribe(topic string, handler messaging.Handler, //run handler concurrently go func() { - newCtx, cancel := context.WithTimeout(n.ctx, parsedOptions.AckWait) - defer cancel() - err = handler(newCtx, &msg) + //newCtx, cancel := context.WithTimeout(n.ctx, parsedOptions.AckWait) + //defer cancel() + err = handler(n.ctx, &msg) if err == nil { // we only send a successful ACK if there is no error natsMsg.Ack()