Rework RPC server start process #3324
Labels
enhancement
Improving existing functionality
I4
No visible changes
rpc
RPC server and client
S2
Regular significance
U3
Regular
Is your feature request related to a problem? Please describe.
After #3307 the only node service that requires from caller to send call to
Start
to a separate goroutine is RPC server. It's so special because it may return errors to the provided error channel, and the caller must start error channel by the moment of RPC server start:neo-go/cli/server/server.go
Lines 503 to 506 in 327e766
One day it may cause a bug, because we always need to remember about this RPC server behaviour.
Describe the solution you'd like
Refactor RPC server start so that the caller is able to call
Start
in the same goroutine. Send code that may return errors to a separate goroutine insideStart
.Describe alternatives you've considered
Allow to return error from
Start
, but it'd be inconvenient since we have commonService
interface and none of our services return error from start.The text was updated successfully, but these errors were encountered: