neoneo-go/pkg/rpc/client
Anna Shaleva 850f56b367 rpc: avoid panic on double-call to *WSClient.Close()
Although it's the caller's duty to avoid WSClient re-closing, we
still can handle it.

Fixes the following neofs-node error:
```
panic: close of closed channel

goroutine 98 [running]:
github.com/nspcc-dev/neo-go/pkg/rpc/client.(*WSClient).Close(...)
        github.com/nspcc-dev/neo-go@v0.98.3-pre.0.20220321144433-3b639f518ebb/pkg/rpc/client/wsclient.go:120
github.com/nspcc-dev/neofs-node/pkg/morph/subscriber.(*subscriber).Close(0x13)
        github.com/nspcc-dev/neofs-node/pkg/morph/subscriber/subscriber.go:108 +0x29
github.com/nspcc-dev/neofs-node/pkg/morph/event.listener.Stop(...)
        github.com/nspcc-dev/neofs-node/pkg/morph/event/listener.go:573
created by github.com/nspcc-dev/neofs-node/pkg/innerring.(*Server).Stop
        github.com/nspcc-dev/neofs-node/pkg/innerring/innerring.go:285 +0x12f
```
2022-04-05 16:31:51 +03:00
..
nns rpc/client: remove dependency on examples 2022-01-25 12:41:06 +03:00
client.go rpc: add a note to RPC clients about thread-safeness 2022-02-24 19:01:21 +03:00
doc.go rpc: update docs of RPC client 2022-01-17 12:00:56 +03:00
doc_test.go rpc: adjust client documentation 2021-09-08 17:53:09 +03:00
helper.go rpc: accept NEP11 token IDs as []byte for client methods 2022-02-09 11:55:07 +03:00
native.go smartcontract: allow to use *big.Int numbers for integers 2022-04-01 08:38:34 +03:00
nep.go rpc: accept NEP11 token IDs as []byte for client methods 2022-02-09 11:55:07 +03:00
nep11.go rpc: carefully review places where Client.cache.initDone is used 2022-02-22 12:52:14 +03:00
nep17.go rpc: carefully review places where Client.cache.initDone is used 2022-02-22 12:52:14 +03:00
policy.go rpc: carefully review places where Client.cache.initDone is used 2022-02-22 12:52:14 +03:00
rpc.go *: support customisable NotaryServiceFeePerKey value 2022-03-01 19:08:16 +03:00
rpc_test.go rpc: make RPC WSClient thread-safe 2022-02-24 19:01:12 +03:00
wsclient.go rpc: avoid panic on double-call to *WSClient.Close() 2022-04-05 16:31:51 +03:00
wsclient_test.go rpc: avoid panic on double-call to *WSClient.Close() 2022-04-05 16:31:51 +03:00