diff --git a/client.go b/client.go index 184d0f18ab42a5db39a5f9d8d5203a58807c1e99..87fe3290b115ef40df55e6264840cb9e3baa0d91 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) }