mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
rpc: don't exceed context deadline while waiting for send lock
This commit is contained in:
parent
3e3a79ea13
commit
464660651d
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue