neoneo-go/pkg/services/rpcsrv
Leonard Lyubich e126bcc462 services/rpcsrv: Wait for subscription process to complete when stopped
Previously RPC server shutdown procedure listened to the execution
channel and stopped at the first element that arrived in the queue. This
could lead to the following problems:
 * stopper could steal the execution result from subscriber
 * stopper didn't wait for other subscription actions to complete

Add dedicated channel to `Server` for subscription routine. Close the
channel on `handleSubEvents` return and wait for signal in `Shutdown`.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2023-04-17 10:42:50 +04:00
..
params rpc: emit Null in case of Any parameter with zero-len value 2023-04-05 16:28:30 +03:00
testdata rpcclient: fix WS-client unsubscription process 2022-11-16 23:44:30 +03:00
client_test.go rpc: emit Null in case of Any parameter with zero-len value 2023-04-05 16:28:30 +03:00
error.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
local_test.go rpcclient: add Internal client for direct RPC server calls 2023-02-16 23:49:58 +03:00
prometheus.go rpcsrv: remove deprecated RPC counters 2023-03-18 10:52:24 +03:00
server.go services/rpcsrv: Wait for subscription process to complete when stopped 2023-04-17 10:42:50 +04:00
server_helper_test.go config: add a special Blockchain type to configure Blockchain 2022-12-07 17:35:53 +03:00
server_test.go services/rpcsrv: Test Server shutdown with failed precondition 2023-04-17 10:42:49 +04:00
subscription.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
subscription_test.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
tokens.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
util.go rpc/server: move to services/rpcsrv 2022-07-21 22:14:12 +03:00