[release] v0.21.6

This commit is contained in:
Yann Stepienik
2026-02-27 11:58:19 +00:00
parent 95da3732d4
commit c1c96bb1a8
3 changed files with 10 additions and 4 deletions
+3
View File
@@ -1,3 +1,6 @@
## Version 0.21.6
- Prevent potential double counting of server by wrong timing
## Version 0.21.5
- Fix issue with nodes having 2 public hostnames
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cosmos-server",
"version": "0.21.5",
"version": "0.21.6",
"description": "",
"main": "test-server.js",
"bugs": {
+6 -3
View File
@@ -2,6 +2,7 @@ package main
import (
"io/ioutil"
"hash/fnv"
"runtime"
"net/http"
"os"
@@ -218,9 +219,11 @@ func CRON() {
checkCerts()
checkUpdatesAvailable()
})
// random 1-23 number
randomHour := utils.GetRandomNumber(1, 23)
hostname, _ := os.Hostname()
h := fnv.New32a()
h.Write([]byte(hostname))
randomHour := int(h.Sum32()%23) + 1
s.Every(1).Day().At(fmt.Sprintf("%02d:45", randomHour)).Do(utils.ProcessLicence)
s.Every(1).Day().At(fmt.Sprintf("%02d:15", randomHour)).Do(checkVersion)