Skip to content

Commit

Permalink
update ConnectionEvent capacity (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
binbin0325 authored Mar 15, 2023
1 parent 82a862a commit 802920d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion clients/naming_client/service_info_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (s *ServiceInfoUpdater) updateServiceNow(serviceName, groupName, clusters s
result, err := s.namingProxy.QueryInstancesOfService(serviceName, groupName, clusters, 0, false)

if err != nil {
logger.Errorf("QueryList return error!serviceName:%s cluster:%s err:%+v", serviceName, clusters, err)
logger.Errorf("QueryInstances error, serviceName:%s, cluster:%s, err:%v", serviceName, clusters, err)
return
}
s.serviceInfoHolder.ProcessService(result)
Expand Down
2 changes: 1 addition & 1 deletion common/remote/rpc/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ func (c *Connection) getAbandon() bool {
}

func (c *Connection) close() {
c.conn.Close()
_ = c.conn.Close()
}
5 changes: 3 additions & 2 deletions common/remote/rpc/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"
"encoding/json"
"io"
"math"
"os"
"strconv"
"sync"
Expand Down Expand Up @@ -50,7 +51,7 @@ func NewGrpcClient(ctx context.Context, clientName string, nacosServer *nacos_se
name: clientName,
labels: make(map[string]string, 8),
rpcClientStatus: INITIALIZED,
eventChan: make(chan ConnectionEvent),
eventChan: make(chan ConnectionEvent, math.MaxInt32),
reconnectionChan: make(chan ReconnectContext),
nacosServer: nacosServer,
serverRequestHandlerMapping: make(map[string]ServerRequestHandlerMapping, 8),
Expand Down Expand Up @@ -138,7 +139,7 @@ func (c *GrpcClient) connectToServer(serverInfo ServerInfo) (IConnection, error)
client = nacos_grpc_service.NewRequestClient(conn)
response, err := serverCheck(client)
if err != nil {
conn.Close()
_ = conn.Close()
return nil, errors.Errorf("server check request failed , err:%v", err)
}
serverCheckResponse := response.(*rpc_response.ServerCheckResponse)
Expand Down
4 changes: 2 additions & 2 deletions common/remote/rpc/server_request_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (c *ClientDetectionRequestHandler) Name() string {
return "ClientDetectionRequestHandler"
}

func (c *ClientDetectionRequestHandler) RequestReply(request rpc_request.IRequest, rpcClient *RpcClient) rpc_response.IResponse {
func (c *ClientDetectionRequestHandler) RequestReply(request rpc_request.IRequest, _ *RpcClient) rpc_response.IResponse {
_, ok := request.(*rpc_request.ClientDetectionRequest)
if ok {
return &rpc_response.ClientDetectionResponse{
Expand All @@ -87,7 +87,7 @@ func (*NamingPushRequestHandler) Name() string {
return "NamingPushRequestHandler"
}

func (c *NamingPushRequestHandler) RequestReply(request rpc_request.IRequest, rpcClient *RpcClient) rpc_response.IResponse {
func (c *NamingPushRequestHandler) RequestReply(request rpc_request.IRequest, _ *RpcClient) rpc_response.IResponse {
notifySubscriberRequest, ok := request.(*rpc_request.NotifySubscriberRequest)
if ok {
c.ServiceInfoHolder.ProcessService(&notifySubscriberRequest.ServiceInfo)
Expand Down

0 comments on commit 802920d

Please sign in to comment.