Skip to content

Commit

Permalink
fix_nil_point
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisChu committed Feb 24, 2022
1 parent ff5474f commit 77d6be1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/common/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type (
IGraphClient interface {
IClient
GetData() (Data, error)
Execute(stat string) (IGraphResponse, error)
Execute(stmt string) (IGraphResponse, error)
}

// IGraphResponse graph response, just support 3 functions to user.
Expand Down
2 changes: 2 additions & 0 deletions pkg/nebulagraph/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func (gp *GraphPool) GetSession(username, password string) (common.IGraphClient,
// balancer, ccore just use the first endpoint
index := len(gp.clients) % len(gp.hosts)
client, err := gp.clientGetter(gp.hosts[index], username, password)

if gp.Version == "" {
gp.Version = string(client.Version())
}
Expand Down Expand Up @@ -259,6 +260,7 @@ func (gc *GraphClient) Execute(stmt string) (common.IGraphResponse, error) {
rs *wrapper.ResultSet
latency int64
)
codeErr, _ = nerrors.AsCodeError(nerrors.NewCodeError(nerrors.ErrorCode_SUCCEEDED, ""))
if err != nil {
codeErr, ok = nerrors.AsCodeError(err)
if !ok {
Expand Down

0 comments on commit 77d6be1

Please sign in to comment.