Skip to content

Commit bc68b11

Browse files
committed
[skip ci] fix cal init error
1 parent e343332 commit bc68b11

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cluster/calcium/calcium.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,14 @@ func New(config types.Config, t *testing.T) (*Calcium, error) {
9090
cal := &Calcium{store: store, config: config, source: scm, watcher: watcher, resource: resource}
9191

9292
cal.wal, err = newWAL(config, cal)
93-
cal.identifier = config.Identifier()
93+
if err != nil {
94+
return nil, logger.ErrWithTracing(nil, errors.WithStack(err)) //nolint
95+
}
96+
97+
cal.identifier, err = config.Identifier()
98+
if err != nil {
99+
return nil, logger.ErrWithTracing(nil, errors.WithStack(err)) //nolint
100+
}
94101

95102
go cal.InitMetrics()
96103

0 commit comments

Comments
 (0)