Skip to content

Commit

Permalink
add log when register err
Browse files Browse the repository at this point in the history
  • Loading branch information
weisd committed Oct 25, 2017
1 parent 53554d9 commit 6385bf7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6385bf7

Please sign in to comment.