fix keepalive conversion type

This commit is contained in:
Abhishek Kondur
2022-12-30 11:43:48 +05:30
parent 2c2b3a4b9b
commit 8a9241d5e2
2 changed files with 3 additions and 3 deletions

View File

@@ -69,7 +69,7 @@ func (a *ApiNode) ConvertToServerNode(currentNode *Node) *Node {
convertedNode.DNSOn = a.DNSOn
convertedNode.EgressGatewayRequest = currentNode.EgressGatewayRequest
convertedNode.EgressGatewayNatEnabled = currentNode.EgressGatewayNatEnabled
convertedNode.PersistentKeepalive = time.Duration(a.PersistentKeepalive)
convertedNode.PersistentKeepalive = time.Second * time.Duration(a.PersistentKeepalive)
convertedNode.RelayAddrs = a.RelayAddrs
convertedNode.DefaultACL = a.DefaultACL
convertedNode.OwnerID = currentNode.OwnerID
@@ -128,7 +128,7 @@ func (nm *Node) ConvertToAPINode() *ApiNode {
}
apiNode.PostDown = nm.PostDown
apiNode.PostUp = nm.PostUp
apiNode.PersistentKeepalive = int32(nm.PersistentKeepalive)
apiNode.PersistentKeepalive = int32(nm.PersistentKeepalive.Seconds())
apiNode.LastModified = nm.LastModified.Unix()
apiNode.LastCheckIn = nm.LastCheckIn.Unix()
apiNode.LastPeerUpdate = nm.LastPeerUpdate.Unix()