Commit 8666da65 authored by Vladimir Barsukov's avatar Vladimir Barsukov
Browse files

fix

parent c140f0f9
......@@ -50,7 +50,7 @@ func New() *Pool {
Continues: []string{"connect", "EOF", "conflict with recovery"},
ContinuesTry: []string{"conflict with recovery"},
TryOnError: 1,
TryOnSleep: time.Second * 5,
TryOnSleep: time.Second,
}
}
......@@ -267,7 +267,7 @@ func (d *Pool) Start() {
d.srvMaster.Alive = d.ping(d.srvMaster) == nil
time.Sleep(time.Second * 1)
time.Sleep(time.Second)
}
}()
}
......
......@@ -33,11 +33,12 @@ func (d *Pool) StatPool() []*Stat {
for _, q := range append(d.srvSlaves, d.srvSlavesAsync...) {
out = append(out, d.stat(q))
}
return out
return append(out, d.stat(d.srvMaster))
}
func (d *Pool) StatPoolTotal() *Stat {
m := d.StatMaster()
m := &Stat{Id: "pool", Mode: connModePool}
for _, s := range d.StatPool() {
m.AcquireCount += s.AcquireCount
......@@ -54,12 +55,7 @@ func (d *Pool) StatPoolTotal() *Stat {
m.MaxIdleDestroyCount += s.MaxIdleDestroyCount
}
m.Id = "pool"
m.Mode = connModePool
m.Host = ""
m.Port = 0
return d.stat(d.srvMaster)
return m
}
func (d *Pool) stat(q *conn) *Stat {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment