neoneo-go/pkg/services/rpcsrv
Leonard Lyubich f8227aa5f7 services/rpcsrv: Fix potential shutdown deadlock of RPC server
Previously RPC server could never be shut down completely due to
some start precondition failure (in particular, inability to serve HTTP
on any configured endpoint). The problem was caused by next facts:
 * start method ran subscription routine after HTTP init succeeded only
 * stop method blocked waiting for the subscription routine to return

Run `handleSubEvents` routine on fresh `Start` unconditionally. With
this change, `Shutdown` method won't produce deadlock since
`handleSubEvents` closes wait channel.

Refs #2896.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2023-08-01 17:27:11 +03:00
..
params rpc: emit Null in case of Any parameter with zero-len value 2023-06-29 11:51:40 +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-06-29 11:51:40 +03:00
error.go rpc: merge response and request under pkg/neorpc 2022-07-25 11:57:53 +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: provide Prometheus histograms for calls 2022-11-09 13:26:45 +03:00
server.go services/rpcsrv: Fix potential shutdown deadlock of RPC server 2023-08-01 17:27:11 +03: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-08-01 17:27:03 +03:00
subscription.go rpcsrv: drop ws from subscriber 2023-02-16 23:49:58 +03:00
subscription_test.go network: do not use error channel to start network srv 2023-08-01 17:22:01 +03:00
tokens.go rpc: merge response and request under pkg/neorpc 2022-07-25 11:57:53 +03:00
util.go rpc/server: move to services/rpcsrv 2022-07-21 22:14:12 +03:00