Merge pull request #213 from weisd/master

add log when register err
This commit is contained in:
Asim Aslam 2017-11-09 13:50:38 +00:00 committed by GitHub
commit a7c4afac54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ import (
"syscall"
"time"
log "github.com/micro/go-log"
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/cmd"
"github.com/micro/go-micro/metadata"
@ -44,7 +45,10 @@ func (s *service) run(exit chan bool) {
for {
select {
case <-t.C:
s.opts.Server.Register()
err := s.opts.Server.Register()
if err != nil {
log.Log("service run Server.Register err : ", err)
}
case <-exit:
t.Stop()
return