go-ethereum
go-ethereum copied to clipboard
RPC Client doesn't gracefully close Websocket Connections
System information
Geth version: 1.14.8
OS & Version: OSX
Expected behaviour
When rpc.Client Close() is called, I would expect a message like this to be sent
err := cli.writeMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""))
Actual behaviour
The client closes the TCP conn without sending a WS Close message, leading to websocket: close 1006 (abnormal closure): unexpected EOF on the server side.
Steps to reproduce the behaviour
Open a WS connection with the rpc.Client. Close the connection.