Procházet zdrojové kódy

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

This fixes an issue with websocket ping frame handling.
Gísli Kristjánsson před 7 roky
rodič
revize
c9a0b36a5f
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      rpc/client.go

+ 1 - 0
rpc/client.go

@@ -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
 	}