Merge pull request #1406 from nspcc-dev/rpc-fix-websocket-tests
rpc/server: fix "websocket: bad handshake" during testing
This commit is contained in:
commit
e414ad3d47
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue