(addrs []resolver.Address, opts balancer.NewSubConnOptions)
| 1003 | } |
| 1004 | |
| 1005 | func (ccw *stateRecordingCCWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) { |
| 1006 | oldListener := opts.StateListener |
| 1007 | opts.StateListener = func(s balancer.SubConnState) { |
| 1008 | ccw.notifier <- s.ConnectivityState |
| 1009 | oldListener(s) |
| 1010 | } |
| 1011 | return ccw.ClientConn.NewSubConn(addrs, opts) |
| 1012 | } |
| 1013 | |
| 1014 | // Keep reading until something causes the connection to die (EOF, server |
| 1015 | // closed, etc). Useful as a tool for mindlessly keeping the connection |
nothing calls this directly
no test coverage detected