connect starts creating a transport. It does nothing if the ac is not IDLE. TODO(bar) Move this to the addrConn section.
()
| 980 | // It does nothing if the ac is not IDLE. |
| 981 | // TODO(bar) Move this to the addrConn section. |
| 982 | func (ac *addrConn) connect() { |
| 983 | ac.mu.Lock() |
| 984 | if ac.state == connectivity.Shutdown { |
| 985 | if logger.V(2) { |
| 986 | logger.Infof("connect called on shutdown addrConn; ignoring.") |
| 987 | } |
| 988 | ac.mu.Unlock() |
| 989 | return |
| 990 | } |
| 991 | if ac.state != connectivity.Idle { |
| 992 | if logger.V(2) { |
| 993 | logger.Infof("connect called on addrConn in non-idle state (%v); ignoring.", ac.state) |
| 994 | } |
| 995 | ac.mu.Unlock() |
| 996 | return |
| 997 | } |
| 998 | |
| 999 | ac.resetTransportAndUnlock() |
| 1000 | } |
| 1001 | |
| 1002 | // equalAddressIgnoringBalAttributes returns true is a and b are considered equal. |
| 1003 | // This is different from the Equal method on the resolver.Address type which |