rpc: reset client write deadline after write (#17549)

This fixes an issue with websocket ping frame handling.
This commit is contained in:
Gísli Kristjánsson 2018-09-03 14:56:30 +00:00 committed by Felix Lange
parent e1c64a7d89
commit c9a0b36a5f

View File

@ -487,6 +487,7 @@ func (c *Client) write(ctx context.Context, msg interface{}) error {
}
c.writeConn.SetWriteDeadline(deadline)
err := json.NewEncoder(c.writeConn).Encode(msg)
c.writeConn.SetWriteDeadline(time.Time{})
if err != nil {
c.writeConn = nil
}