aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/client.go')
-rw-r--r--rpc/client.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/rpc/client.go b/rpc/client.go
index 4ff9a8cb9..0c52402ea 100644
--- a/rpc/client.go
+++ b/rpc/client.go
@@ -398,6 +398,10 @@ func (c *Client) send(ctx context.Context, op *requestOp, msg interface{}) error
err := c.write(ctx, msg)
c.sendDone <- err
return err
+ case <-ctx.Done():
+ // This can happen if the client is overloaded or unable to keep up with
+ // subscription notifications.
+ return ctx.Err()
case <-c.didQuit:
return ErrClientQuit
}