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

Function reject

lib/client.js:1947–1959  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1945 return stream;
1946 };
1947 const reject = () => {
1948 if (reason === undefined) {
1949 if (localChan === -1)
1950 reason = CHANNEL_OPEN_FAILURE.RESOURCE_SHORTAGE;
1951 else
1952 reason = CHANNEL_OPEN_FAILURE.CONNECT_FAILED;
1953 }
1954
1955 if (localChan !== -1)
1956 self._chanMgr.remove(localChan);
1957
1958 self._protocol.channelOpenFail(info.sender, reason, '');
1959 };
1960 const reserveChannel = () => {
1961 localChan = self._chanMgr.add();
1962

Callers 4

onCHANNEL_OPENFunction · 0.85
constructorMethod · 0.85
crypto.jsFile · 0.85

Calls 2

removeMethod · 0.80
channelOpenFailMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…