diff options
-rw-r--r-- | rpc/client.go | 4 |
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 } |