aboutsummaryrefslogtreecommitdiffstats
path: root/cmd-target.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-03-12 16:10:40 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-03-12 16:10:40 +0100
commit05ecb2f2c82e6da6f0d93644589b8aae660e3ebf (patch)
tree2df4f5ffc85e05e55aa4610fbf1751ea5e9d7795 /cmd-target.go
parent92f718ade3789c1ed33be04d03c3214b6ed8f596 (diff)
Exit xds-cli on XDS-Server disconneciton.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'cmd-target.go')
-rw-r--r--cmd-target.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd-target.go b/cmd-target.go
index cd96ed4..33b757d 100644
--- a/cmd-target.go
+++ b/cmd-target.go
@@ -437,6 +437,10 @@ func terminalOpen(ctx *cli.Context) error {
// Wait exit - blocking
select {
+ case res := <-IOSkClient.ServerDiscoChan:
+ Log.Debugf("XDS Server disconnected %v", res)
+ return cli.NewExitError(res.error, res.code)
+
case res := <-exitChan:
errStr := ""
if res.code == 0 {