From 26e0c49acf9328e0c7e3852d6a68e4cc63ce14d7 Mon Sep 17 00:00:00 2001 From: Immersed <167606329+immersedin@users.noreply.github.com> Date: Fri, 5 Jul 2024 05:27:44 +0300 Subject: [PATCH] Update pubsub.go (#3042) Change context.Background() to ctx --- pubsub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubsub.go b/pubsub.go index aea96241..72b18f49 100644 --- a/pubsub.go +++ b/pubsub.go @@ -84,7 +84,7 @@ func (c *PubSub) conn(ctx context.Context, newChannels []string) (*pool.Conn, er } func (c *PubSub) writeCmd(ctx context.Context, cn *pool.Conn, cmd Cmder) error { - return cn.WithWriter(context.Background(), c.opt.WriteTimeout, func(wr *proto.Writer) error { + return cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error { return writeCmd(wr, cmd) }) }