The random Seed should be executed only once.
If two users connect to the system in the same second both would receive the same id. This fix this error.
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Conf holds the global configuration state
|
||||
@@ -15,6 +17,7 @@ var conf configFile
|
||||
|
||||
// Start Parse the configuration file and starts the ipe server
|
||||
func Start(configfile string) error {
|
||||
rand.Seed(time.Now().Unix())
|
||||
file, err := ioutil.ReadFile(configfile)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user