Skip to content

Commit e3dc619

Browse files
authored
[Bugfix] Fix executor (#1327)
1 parent 959692a commit e3dc619

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

pkg/util/arangod/conn/conn.executor.go

-4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ func (e executor[IN, OUT]) Execute(ctx context.Context, method string, endpoint
6666

6767
defer resp.Close()
6868

69-
if err := resp.Close(); err != nil {
70-
return nil, 0, err
71-
}
72-
7369
var out OUT
7470

7571
if err := json.NewDecoder(resp).Decode(&out); err != nil {

pkg/util/arangod/conn/factory.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ func (f factory) RawConnection(host string) (Connection, error) {
7373
return nil, err
7474
}
7575

76-
if auth.Type() != driver.AuthenticationTypeRaw {
77-
return nil, errors.Newf("Only RAW Authentication is supported")
78-
}
76+
if auth != nil {
77+
if auth.Type() != driver.AuthenticationTypeRaw {
78+
return nil, errors.Newf("Only RAW Authentication is supported")
79+
}
7980

80-
authString = util.NewType(auth.Get("value"))
81+
authString = util.NewType(auth.Get("value"))
82+
}
8183
}
8284

8385
return connection{

0 commit comments

Comments
 (0)