neoneo-go/pkg/services
Leonard Lyubich a113940f0b 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-04-17 10:42:50 +04:00
..
helpers/rpcbroadcaster *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
metrics services: allow multiple listen addresses for simple services 2022-12-07 11:23:01 +03:00
notary *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
oracle *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
rpcsrv services/rpcsrv: Fix potential shutdown deadlock of RPC server 2023-04-17 10:42:50 +04:00
stateroot *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00