hosname 수정

main
JungJun 2 years ago
parent b3afe0e5e2
commit 6427273165

@ -5,6 +5,7 @@ import (
"fmt"
"io"
"math/rand"
"os"
"strings"
"sync"
"time"
@ -146,7 +147,7 @@ func ListenStatMNG1() (icserr *icserror.IcsError) {
}
func NewSidVal() {
conf := icsconf.GetIcsConfig()
// conf := icsconf.GetIcsConfig()
timeN := time.Now()
nano := fmt.Sprintf("%d", timeN.UTC().Nanosecond())
seq := fmt.Sprintf("%02d%02d%02d%03s", timeN.Hour(), timeN.Minute(), timeN.Second(), nano[:3])
@ -155,8 +156,14 @@ func NewSidVal() {
}
gSeqVal.M = &sync.Mutex{}
hostname, err := os.Hostname()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
ghost = &Host{
HostName: conf.InfoConfig.HostName,
HostName: hostname,
}
ghost.M = &sync.Mutex{}
}

Loading…
Cancel
Save