[dnsSync] changed logger level to error when failed to listen for a specific port when starting sync server.

pull/3684/head
Jacky Wang 4 years ago committed by Leo Chen
parent 33a6ec23fd
commit c84d01aba2
  1. 4
      api/service/legacysync/downloader/server.go

@ -2,7 +2,6 @@ package downloader
import (
"context"
"log"
"net"
"strconv"
@ -47,7 +46,8 @@ func (s *Server) Start() (*grpc.Server, error) {
addr := net.JoinHostPort("", strconv.Itoa(s.Port))
lis, err := net.Listen("tcp4", addr)
if err != nil {
log.Fatalf("[SYNC] failed to listen: %v", err)
utils.Logger().Error().Err(err).Msg("[SYNC] failed to start sync server")
return nil, err
}
var opts []grpc.ServerOption
grpcServer := grpc.NewServer(opts...)

Loading…
Cancel
Save