MCPcopy Create free account
hub / github.com/mscdex/ssh2 / reserveChannel

Function reserveChannel

lib/client.js:1960–1974  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1958 self._protocol.channelOpenFail(info.sender, reason, '');
1959 };
1960 const reserveChannel = () => {
1961 localChan = self._chanMgr.add();
1962
1963 if (localChan === -1) {
1964 reason = CHANNEL_OPEN_FAILURE.RESOURCE_SHORTAGE;
1965 if (self.config.debug) {
1966 self.config.debug(
1967 'Client: Automatic rejection of incoming channel open: '
1968 + 'no channels available'
1969 );
1970 }
1971 }
1972
1973 return (localChan !== -1);
1974 };
1975
1976 const data = info.data;
1977 switch (info.type) {

Callers 2

onCHANNEL_OPENFunction · 0.85
constructorMethod · 0.85

Calls 1

addMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…