rpc/server: fix "websocket: bad handshake" during testing

I think it's caused by connection limits server-side, we never close
connection on the client.
This commit is contained in:
Roman Khimov 2020-09-16 12:51:59 +03:00
parent d2b37adf95
commit 93be4bbeee

View file

@ -974,6 +974,7 @@ func doRPCCallOverWS(rpcCall string, url string, t *testing.T) []byte {
c.SetReadDeadline(time.Now().Add(time.Second)) c.SetReadDeadline(time.Now().Add(time.Second))
_, body, err := c.ReadMessage() _, body, err := c.ReadMessage()
require.NoError(t, err) require.NoError(t, err)
require.NoError(t, c.Close())
return bytes.TrimSpace(body) return bytes.TrimSpace(body)
} }