This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/develop by this push:
new ff3500cc1 fix:invalid timeout (#2797)
ff3500cc1 is described below
commit ff3500cc1d90086f4d976bdfb5e204482620cb7d
Author: finalt <[email protected]>
AuthorDate: Sun Mar 16 20:21:53 2025 +0800
fix:invalid timeout (#2797)
* fix: Fix problematic error returns (#2791)
Signed-off-by: cuishuang <[email protected]>
* chore: fix some comments (#2793)
Signed-off-by: cuishuang <[email protected]>
* fix:invalid timeout
* delete comment
---------
Signed-off-by: cuishuang <[email protected]>
Co-authored-by: cui fliter <[email protected]>
---
client/action.go | 1 +
protocol/dubbo/dubbo_invoker.go | 3 +--
protocol/dubbo/hessian2/hessian_dubbo.go | 2 +-
protocol/dubbo/impl/response.go | 2 +-
protocol/dubbo3/dubbo3_exporter.go | 2 +-
protocol/grpc/internal/routeguide/client.go | 4 ++--
protocol/jsonrpc/jsonrpc_exporter.go | 2 +-
protocol/rest/rest_exporter.go | 2 +-
registry/etcdv3/service_discovery.go | 2 +-
xds/credentials/certgenerate/generate_cert.go | 2 +-
10 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/client/action.go b/client/action.go
index a3221a0eb..c71efdfaf 100644
--- a/client/action.go
+++ b/client/action.go
@@ -127,6 +127,7 @@ func (refOpts *ReferenceOptions) refer(srv
common.RPCService, info *ClientInfo)
common.WithParams(refOpts.getURLMap()),
common.WithParamsValue(constant.BeanNameKey, refOpts.id),
common.WithParamsValue(constant.MetadataTypeKey,
refOpts.metaDataType),
+ common.WithParamsValue(constant.TimeoutKey,
refOpts.Consumer.RequestTimeout),
common.WithParamsValue(constant.KeepAliveInterval,
ref.KeepAliveInterval),
common.WithParamsValue(constant.KeepAliveTimeout,
ref.KeepAliveTimeout),
)
diff --git a/protocol/dubbo/dubbo_invoker.go b/protocol/dubbo/dubbo_invoker.go
index 378deb607..ebab28b26 100644
--- a/protocol/dubbo/dubbo_invoker.go
+++ b/protocol/dubbo/dubbo_invoker.go
@@ -41,8 +41,7 @@ import (
)
var attachmentKey = []string{
- constant.InterfaceKey, constant.GroupKey, constant.TokenKey,
constant.TimeoutKey,
- constant.VersionKey,
+ constant.InterfaceKey, constant.GroupKey, constant.TokenKey,
constant.VersionKey,
}
// DubboInvoker is implement of protocol.Invoker. A dubboInvoker refers to one
service and ip.
diff --git a/protocol/dubbo/hessian2/hessian_dubbo.go
b/protocol/dubbo/hessian2/hessian_dubbo.go
index 5ae8b2643..83f615919 100644
--- a/protocol/dubbo/hessian2/hessian_dubbo.go
+++ b/protocol/dubbo/hessian2/hessian_dubbo.go
@@ -76,7 +76,7 @@ func NewHessianCodec(reader *bufio.Reader) *HessianCodec {
}
}
-// NewHessianCodec generate a new hessian codec instance
+// NewHessianCodecCustom generate a new hessian codec instance
func NewHessianCodecCustom(pkgType PackageType, reader *bufio.Reader, bodyLen
int) *HessianCodec {
return &HessianCodec{
pkgType: pkgType,
diff --git a/protocol/dubbo/impl/response.go b/protocol/dubbo/impl/response.go
index 9fde1eb24..b4ef40ec7 100644
--- a/protocol/dubbo/impl/response.go
+++ b/protocol/dubbo/impl/response.go
@@ -23,7 +23,7 @@ type ResponsePayload struct {
Attachments map[string]interface{}
}
-// NewResponse create a new ResponsePayload
+// NewResponsePayload create a new ResponsePayload
func NewResponsePayload(rspObj interface{}, exception error, attachments
map[string]interface{}) *ResponsePayload {
if attachments == nil {
attachments = make(map[string]interface{})
diff --git a/protocol/dubbo3/dubbo3_exporter.go
b/protocol/dubbo3/dubbo3_exporter.go
index eff398a84..f53d8118c 100644
--- a/protocol/dubbo3/dubbo3_exporter.go
+++ b/protocol/dubbo3/dubbo3_exporter.go
@@ -48,7 +48,7 @@ func NewDubboExporter(key string, invoker protocol.Invoker,
exporterMap *sync.Ma
}
}
-// Unexport unexport dubbo3 service exporter.
+// UnExport unexport dubbo3 service exporter.
func (de *DubboExporter) UnExport() {
url := de.GetInvoker().GetURL()
interfaceName := url.GetParam(constant.InterfaceKey, "")
diff --git a/protocol/grpc/internal/routeguide/client.go
b/protocol/grpc/internal/routeguide/client.go
index 542667ef5..fd0a3b555 100644
--- a/protocol/grpc/internal/routeguide/client.go
+++ b/protocol/grpc/internal/routeguide/client.go
@@ -36,7 +36,7 @@ func init() {
config.SetConsumerService(&RouteGuideClientImpl{})
}
-// printFeatures lists all the features within the given bounding Rectangle.
+// PrintFeatures lists all the features within the given bounding Rectangle.
func PrintFeatures(stream RouteGuide_ListFeaturesClient) {
for {
feature, err := stream.Recv()
@@ -51,7 +51,7 @@ func PrintFeatures(stream RouteGuide_ListFeaturesClient) {
}
}
-// runRecordRoute sends a sequence of points to server and expects to get a
RouteSummary from server.
+// RunRecordRoute sends a sequence of points to server and expects to get a
RouteSummary from server.
func RunRecordRoute(stream RouteGuide_RecordRouteClient) {
// Create a random number of random points
r := rand.New(rand.NewSource(time.Now().UnixNano()))
diff --git a/protocol/jsonrpc/jsonrpc_exporter.go
b/protocol/jsonrpc/jsonrpc_exporter.go
index 5ff72f95d..669e59d5e 100644
--- a/protocol/jsonrpc/jsonrpc_exporter.go
+++ b/protocol/jsonrpc/jsonrpc_exporter.go
@@ -43,7 +43,7 @@ func NewJsonrpcExporter(key string, invoker protocol.Invoker,
exporterMap *sync.
}
}
-// Unexport exported JSON RPC service.
+// UnExport exported JSON RPC service.
func (je *JsonrpcExporter) UnExport() {
interfaceName :=
je.GetInvoker().GetURL().GetParam(constant.InterfaceKey, "")
err := common.ServiceMap.UnRegister(interfaceName, JSONRPC,
je.GetInvoker().GetURL().ServiceKey())
diff --git a/protocol/rest/rest_exporter.go b/protocol/rest/rest_exporter.go
index 573188109..16ace5bf3 100644
--- a/protocol/rest/rest_exporter.go
+++ b/protocol/rest/rest_exporter.go
@@ -43,7 +43,7 @@ func NewRestExporter(key string, invoker protocol.Invoker,
exporterMap *sync.Map
}
}
-// Unexport unexport the RestExporter
+// UnExport unexport the RestExporter
func (re *RestExporter) UnExport() {
interfaceName :=
re.GetInvoker().GetURL().GetParam(constant.InterfaceKey, "")
err := common.ServiceMap.UnRegister(interfaceName, REST,
re.GetInvoker().GetURL().ServiceKey())
diff --git a/registry/etcdv3/service_discovery.go
b/registry/etcdv3/service_discovery.go
index 59cb096c9..f2187a73b 100644
--- a/registry/etcdv3/service_discovery.go
+++ b/registry/etcdv3/service_discovery.go
@@ -300,7 +300,7 @@ func (e *etcdV3ServiceDiscovery) DataChange(eventType
remoting.Event) bool {
return true
}
-// newEtcdv3ServiceDiscovery
+// newEtcdV3ServiceDiscovery
func newEtcdV3ServiceDiscovery(url *common.URL) (registry.ServiceDiscovery,
error) {
initLock.Lock()
defer initLock.Unlock()
diff --git a/xds/credentials/certgenerate/generate_cert.go
b/xds/credentials/certgenerate/generate_cert.go
index 32a4c5365..160cb10cb 100644
--- a/xds/credentials/certgenerate/generate_cert.go
+++ b/xds/credentials/certgenerate/generate_cert.go
@@ -328,7 +328,7 @@ func genCertTemplateFromCSR(csr *x509.CertificateRequest,
subjectIDs []string, t
}, nil
}
-// genCertTemplateFromoptions generates a certificate template with the given
options.
+// genCertTemplateFromOptions generates a certificate template with the given
options.
func genCertTemplateFromOptions(options CertOptions) (*x509.Certificate,
error) {
var keyUsage x509.KeyUsage
if options.IsCA {