allow nil metric
This commit is contained in:
parent
183edb517c
commit
1e53e7f33b
@ -52,6 +52,9 @@ func Size(size int) zap.Field {
|
||||
}
|
||||
|
||||
func (m *metric) RequestLog(ctx context.Context, rpc string, fields ...zap.Field) {
|
||||
if m == nil {
|
||||
return
|
||||
}
|
||||
peerId, _ := peer.CtxPeerId(ctx)
|
||||
ak, _ := peer.CtxPubKey(ctx)
|
||||
var acc string
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user