From f3af87f58e552092404c65e428d82a1a8146c622 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 11 Jul 2024 14:32:35 +0200 Subject: pkg/rpcserver: exit on connection loop abortion For local rpcserver runs, we do not reboot the executor in case of errors. Moreover, if the error did not lead to the executor process exit, we may never detect that something went wrong. Return an error channel from CreateInstance() to be able to act on connection loop errors. Explicitly register the instance during local executions and exit from RunLocal() in case of connection problems. --- pkg/rpcserver/runner.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/rpcserver/runner.go') diff --git a/pkg/rpcserver/runner.go b/pkg/rpcserver/runner.go index ec4ad2076..691a5b5d5 100644 --- a/pkg/rpcserver/runner.go +++ b/pkg/rpcserver/runner.go @@ -44,6 +44,7 @@ type Runner struct { lastExec *LastExecuting rnd *rand.Rand updInfo dispatcher.UpdateInfo + resultCh chan error // The mutex protects all the fields below. mu sync.Mutex -- cgit mrf-deployment