Commit 5ee86446 authored by hujiebin's avatar hujiebin

fix:

parent 53d191e1
......@@ -49,7 +49,6 @@ type ProtoData struct {
var myAddress = ""
var m sync.RWMutex
var userChan = make(map[uint64]map[string]chan ProtoData)
var logDir = "/var/log/hilo/"
/* 其中CheckOringin是一个函数,该函数用于拦截或放行跨域请求。函数返回值为bool类型,即true放行,false拦截。
如果请求不是跨域请求可以不赋值,我这里是跨域请求并且为了方便直接返回true
......@@ -642,7 +641,7 @@ func main() {
if cataLog == nil {
mylogrus.MyLog.Fatalln("No catalog.")
}
services, _, err := cataLog.Service("userCenter", "", nil)
services, _, err := cataLog.Service(userCenterConsulName, "", nil)
if err != nil {
mylogrus.MyLog.Fatalln(err)
}
......@@ -663,7 +662,7 @@ func main() {
// 服务发现
resolver.Register(bd)
go func() {
consul.RegisterWatcher(defaultUserCenterAddr, func(addr []string) {
consul.RegisterWatcher(userCenterConsulName, func(addr []string) {
if len(addr) > 0 {
bd.UpdateState(addr) // 更新新的注册名
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment