mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
check error when raftApplyMsgpack
This commit is contained in:
parent
3091026e02
commit
5ed56fc786
@ -12,9 +12,8 @@ import (
|
|||||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||||
"github.com/aws/aws-sdk-go/aws/session"
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/acmpca"
|
"github.com/aws/aws-sdk-go/service/acmpca"
|
||||||
"github.com/mitchellh/mapstructure"
|
|
||||||
|
|
||||||
"github.com/hashicorp/go-hclog"
|
"github.com/hashicorp/go-hclog"
|
||||||
|
"github.com/mitchellh/mapstructure"
|
||||||
|
|
||||||
"github.com/hashicorp/consul/agent/connect"
|
"github.com/hashicorp/consul/agent/connect"
|
||||||
"github.com/hashicorp/consul/agent/structs"
|
"github.com/hashicorp/consul/agent/structs"
|
||||||
|
@ -105,6 +105,9 @@ func (c *caDelegateWithState) ApplyCALeafRequest() (uint64, error) {
|
|||||||
Datacenter: c.Server.config.Datacenter,
|
Datacenter: c.Server.config.Datacenter,
|
||||||
}
|
}
|
||||||
resp, err := c.Server.raftApplyMsgpack(structs.ConnectCALeafRequestType|structs.IgnoreUnknownTypeFlag, &req)
|
resp, err := c.Server.raftApplyMsgpack(structs.ConnectCALeafRequestType|structs.IgnoreUnknownTypeFlag, &req)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
|
||||||
modIdx, ok := resp.(uint64)
|
modIdx, ok := resp.(uint64)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user