Skip to content

Commit

Permalink
[dnsSync] changed logger level to error when failed to listen for a s…
Browse files Browse the repository at this point in the history
…pecific port when starting sync server.
  • Loading branch information
JackyWYX authored and Leo Chen committed Apr 29, 2021
1 parent 33a6ec2 commit c84d01a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/service/legacysync/downloader/server.go
Expand Up @@ -2,7 +2,6 @@ package downloader

import (
"context"
"log"
"net"
"strconv"

Expand Down Expand Up @@ -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...)
Expand Down

0 comments on commit c84d01a

Please sign in to comment.