Commit 229c93f7 authored by Brian Tiger Chow's avatar Brian Tiger Chow
parent d79ba526
......@@ -262,6 +262,16 @@ func (c *MultiConn) ID() string {
return string(ids)
}
func (c *MultiConn) Conns() []Conn {
c.RLock()
defer c.RUnlock()
var conns []Conn
for _, c := range c.conns {
conns = append(conns, c)
}
return conns
}
func (c *MultiConn) String() string {
return String(c, "MultiConn")
}
......
......@@ -307,11 +307,11 @@ func TestMulticonnClose(t *testing.T) {
ctx := context.Background()
c1, c2 := setupMultiConns(t, ctx)
for _, c := range c1.conns {
for _, c := range c1.Conns() {
c.Close()
}
for _, c := range c2.conns {
for _, c := range c2.Conns() {
c.Close()
}
......
Markdown is supported
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