shutdownRemainingLocked shuts down remaining subConns. Called when a subConn becomes ready, which means that all other subConn must be shutdown.
(selected *scData)
| 519 | // shutdownRemainingLocked shuts down remaining subConns. Called when a subConn |
| 520 | // becomes ready, which means that all other subConn must be shutdown. |
| 521 | func (b *pickfirstBalancer) shutdownRemainingLocked(selected *scData) { |
| 522 | b.cancelConnectionTimer() |
| 523 | for _, sd := range b.subConns.All() { |
| 524 | if sd.subConn != selected.subConn { |
| 525 | sd.subConn.Shutdown() |
| 526 | } |
| 527 | } |
| 528 | b.subConns = resolver.NewAddressMapV2[*scData]() |
| 529 | b.subConns.Set(selected.addr, selected) |
| 530 | } |
| 531 | |
| 532 | // requestConnectionLocked starts connecting on the subchannel corresponding to |
| 533 | // the current address. If no subchannel exists, one is created. If the current |
no test coverage detected