Skip to content

Commit

Permalink
fix: fix issue apache#1687
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun committed Dec 27, 2021
1 parent 6710138 commit 9374686
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion registry/polaris/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func createRegisterParam(url *common.URL, serviceName string) *api.InstanceRegis
})
metadata[constant.PolarisDubboPath] = url.Path

return &api.InstanceRegisterRequest{
req := &api.InstanceRegisterRequest{
InstanceRegisterRequest: model.InstanceRegisterRequest{
Service: serviceName,
Namespace: url.GetParam(constant.PolarisNamespace, constant.PolarisDefaultNamespace),
Expand All @@ -301,6 +301,10 @@ func createRegisterParam(url *common.URL, serviceName string) *api.InstanceRegis
Metadata: metadata,
},
}

req.SetTTL(5)

return req
}

// createDeregisterParam convert dubbo url to polaris instance deregister request
Expand Down

0 comments on commit 9374686

Please sign in to comment.