Drain drains the associated ServerTransport, or sets draining to true so it will be drained after it is created.
()
| 137 | // Drain drains the associated ServerTransport, or sets draining to true so it |
| 138 | // will be drained after it is created. |
| 139 | func (c *connWrapper) Drain() { |
| 140 | c.mu.Lock() |
| 141 | defer c.mu.Unlock() |
| 142 | if c.st == nil { |
| 143 | c.draining = true |
| 144 | } else { |
| 145 | c.st.Drain("draining") |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | // Close closes the providers and the underlying connection. |
| 150 | func (c *connWrapper) Close() error { |