mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Fix dial call if it is nil
This commit is contained in:
parent
4e57651f66
commit
f2fea0b795
1 changed files with 4 additions and 1 deletions
|
@ -30,7 +30,10 @@ func registerMetrics(ref *prometheus.Registry, sp *streamPool, name string) {
|
|||
Name: "dial_queue",
|
||||
Help: "dial queue size",
|
||||
}, func() float64 {
|
||||
return float64(sp.dial.batch.Len())
|
||||
if sp.dial != nil {
|
||||
return float64(sp.dial.batch.Len())
|
||||
}
|
||||
return 0
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue