hosname 수정

main
JungJun 2 years ago
parent b3afe0e5e2
commit 6427273165

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

Loading…
Cancel
Save