Merge pull request #4599 from hsjoberg/lndmobile-restart

mobile: re-initialize listeners via RecreateListeners
This commit is contained in:
Johan T. Halseth 2021-04-15 08:53:55 +02:00 committed by GitHub
commit faf5049848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y \
ARG PROTOC_GEN_VERSION ARG PROTOC_GEN_VERSION
ARG GRPC_GATEWAY_VERSION ARG GRPC_GATEWAY_VERSION
ENV FALAFEL_VERSION="v0.8.1" ENV FALAFEL_VERSION="v0.9.0"
ENV GOCACHE=/tmp/build/.cache ENV GOCACHE=/tmp/build/.cache
ENV GOMODCACHE=/tmp/build/.modcache ENV GOMODCACHE=/tmp/build/.modcache

@ -31,6 +31,11 @@ var lndStarted int32
// current app directory in order to ensure lnd has the permissions needed to // current app directory in order to ensure lnd has the permissions needed to
// write to it. // write to it.
func Start(extraArgs string, rpcReady Callback) { func Start(extraArgs string, rpcReady Callback) {
// (Re-)initialize the in-mem gRPC listeners we're going to give to lnd.
// This is required each time lnd is started, because when lnd shuts
// down, the in-mem listeners are closed.
RecreateListeners()
// Split the argument string on "--" to get separated command line // Split the argument string on "--" to get separated command line
// arguments. // arguments.
var splitArgs []string var splitArgs []string