MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / SetConnectionCountAtLeast

Method SetConnectionCountAtLeast

ssh/connection.go:142–150  ·  view source on GitHub ↗

SetConnectionCountAtLeast sets the number of connections to be not less than the specified number.

(n int)

Source from the content-addressed store, hash-verified

140// SetConnectionCountAtLeast sets the number of connections to be not less than
141// the specified number.
142func (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
152func (st *SSHTransfer) spawnConnection(n int) (*PktlineConnection, string, error) {
153 conn, _, controlPath, err := startConnection(n, st.osEnv, st.gitEnv, st.meta, st.operation, st.controlPath)

Callers 1

WorkerStartingMethod · 0.80

Calls 3

setConnectionCountMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected