rpcclient: fix WS-client unsubscription process
Do not block subscribers until the unsubscription request to RPC server is completed. Otherwise, another notification may be received from the RPC server which will block the unsubscription process. At the same time, fix event-based waiter. We must not block the receiver channel during unsubscription because there's a chance that subsequent event will be sent by the server. We need to read this event in order not to block the WSClient's readloop.
This commit is contained in:
parent
ddaba9e74d
commit
6dbae7edc4
9 changed files with 225 additions and 86 deletions
|
@ -200,9 +200,10 @@ func (e *Executor) InvokeScriptCheckHALT(t testing.TB, script []byte, signers []
|
|||
|
||||
// InvokeScriptCheckFAULT adds a transaction with the specified script to the
|
||||
// chain and checks if it's FAULTed with the specified error.
|
||||
func (e *Executor) InvokeScriptCheckFAULT(t testing.TB, script []byte, signers []Signer, errMessage string) {
|
||||
func (e *Executor) InvokeScriptCheckFAULT(t testing.TB, script []byte, signers []Signer, errMessage string) util.Uint256 {
|
||||
hash := e.InvokeScript(t, script, signers)
|
||||
e.CheckFault(t, hash, errMessage)
|
||||
return hash
|
||||
}
|
||||
|
||||
// CheckHalt checks that the transaction is persisted with HALT state.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue