rpc: exit from Start after Listener is running

If port is dynamically allocated, `(*Server).Addr` will contain
0 port. This commit executes listener before exiting from `Start()`
and sets Addr to the actual address.
This commit is contained in:
Evgenii Stratonikov 2020-08-31 15:35:55 +03:00
parent 911be78cc7
commit 758a88a813
3 changed files with 20 additions and 6 deletions

View file

@ -355,7 +355,7 @@ func startServer(ctx *cli.Context) error {
errChan := make(chan error)
go serv.Start(errChan)
go rpcServer.Start(errChan)
rpcServer.Start(errChan)
fmt.Fprintln(ctx.App.Writer, logo())
fmt.Fprintln(ctx.App.Writer, serv.UserAgent)