Unverified Commit f45f673a authored by Lincoln Nogueira's avatar Lincoln Nogueira Committed by GitHub

chore: respect supplied listening address (#3338)

parent f30599fb
......@@ -63,7 +63,7 @@ func NewAPIV1Service(secret string, profile *profile.Profile, store *store.Store
func (s *APIV1Service) RegisterGateway(ctx context.Context, echoServer *echo.Echo) error {
conn, err := grpc.DialContext(
ctx,
fmt.Sprintf(":%d", s.Profile.Port),
fmt.Sprintf("%s:%d", s.Profile.Addr, s.Profile.Port),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(100*1024*1024)),
)
......
......@@ -88,7 +88,7 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
}
func (s *Server) Start(ctx context.Context) error {
address := fmt.Sprintf(":%d", s.Profile.Port)
address := fmt.Sprintf("%s:%d", s.Profile.Addr, s.Profile.Port)
listener, err := net.Listen("tcp", address)
if err != nil {
return errors.Wrap(err, "failed to listen")
......
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