cmd/cli: skip deactivation check for old socket server

If the server is running old version of ctrld, the deactivation pin
check will return 404 not found, the client should consider this as no
error instead of returning invalid pin code.

This allows v1.3.5 binary `ctrld start` command while the ctrld server
is still running old version. I discover this while testing v1.3.5
binary on a router with old ctrld version running.
This commit is contained in:
Cuong Manh Le
2024-02-21 18:00:25 +07:00
committed by Cuong Manh Le
parent 906479a15c
commit 8f189c919a

View File

@@ -2194,6 +2194,8 @@ func checkDeactivationPin(s service.Service) error {
return errRequiredDeactivationPin // pin is required
case http.StatusOK:
return nil // valid pin
case http.StatusNotFound:
return nil // the server is running older version of ctrld
}
}
mainLog.Load().Error().Msg(errInvalidDeactivationPin.Error())