From 845854c0857176af163786e5c0cd8e29f81d4e65 Mon Sep 17 00:00:00 2001 From: a <a@tuxpa.in> Date: Fri, 17 Feb 2023 01:02:13 -0600 Subject: [PATCH] more deletions --- client.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/client.go b/client.go index 184d0f1..87fe329 100644 --- a/client.go +++ b/client.go @@ -379,18 +379,15 @@ func (c *Client) BatchCall(ctx context.Context, b ...BatchElem) error { } func (c *Client) Notify(ctx context.Context, method string, args ...any) error { - return c.DoNotify(ctx, method, args) -} - -// Notify sends a notification, i.e. a method call that doesn't expect a response. -func (c *Client) DoNotify(ctx context.Context, method string, args any) error { op := new(requestOp) msg, err := c.newMessageP(method, args) if err != nil { return err } + if ctx == nil { + ctx = context.TODO() + } msg.ID = nil - if c.isHTTP { return c.sendHTTP(ctx, op, msg) } -- GitLab