SetConnectionCountAtLeast sets the number of connections to be not less than the specified number.
(n int)
| 140 | // SetConnectionCountAtLeast sets the number of connections to be not less than |
| 141 | // the specified number. |
| 142 | func (st *SSHTransfer) SetConnectionCountAtLeast(n int) error { |
| 143 | st.lock.Lock() |
| 144 | defer st.lock.Unlock() |
| 145 | count := len(st.conn) |
| 146 | if n <= count { |
| 147 | return nil |
| 148 | } |
| 149 | return st.setConnectionCount(n) |
| 150 | } |
| 151 | |
| 152 | func (st *SSHTransfer) spawnConnection(n int) (*PktlineConnection, string, error) { |
| 153 | conn, _, controlPath, err := startConnection(n, st.osEnv, st.gitEnv, st.meta, st.operation, st.controlPath) |
no test coverage detected