Browse Source

check/update version of netclient in client config during checkin

Matthew R. Kasun 2 years ago
parent
commit
fb5cf84b5e
1 changed files with 5 additions and 0 deletions
  1. 5 0
      netclient/functions/mqpublish.go

+ 5 - 0
netclient/functions/mqpublish.go

@@ -94,6 +94,11 @@ func checkin() {
 				}
 				}
 			}
 			}
 		}
 		}
+		//check version
+		if nodeCfg.Node.Version != ncutils.Version {
+			nodeCfg.Node.Version = ncutils.Version
+			config.Write(&nodeCfg, nodeCfg.Network)
+		}
 		Hello(&nodeCfg)
 		Hello(&nodeCfg)
 		checkCertExpiry(&nodeCfg)
 		checkCertExpiry(&nodeCfg)
 	}
 	}