mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 09:34:03 +08:00
fix: multiconn s/Conns()/getConns()
@jbenet must be getConns to avoid clash with private var License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
@ -262,7 +262,7 @@ func (c *MultiConn) ID() string {
|
||||
return string(ids)
|
||||
}
|
||||
|
||||
func (c *MultiConn) Conns() []Conn {
|
||||
func (c *MultiConn) getConns() []Conn {
|
||||
c.RLock()
|
||||
defer c.RUnlock()
|
||||
var conns []Conn
|
||||
|
@ -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.getConns() {
|
||||
c.Close()
|
||||
}
|
||||
|
||||
for _, c := range c2.Conns() {
|
||||
for _, c := range c2.getConns() {
|
||||
c.Close()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user