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

Method reject

lib/server.js:554–569  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

552
553 let accept;
554 const reject = () => {
555 if (replied)
556 return;
557 replied = true;
558
559 if (reason === undefined) {
560 if (localChan === -1)
561 reason = CHANNEL_OPEN_FAILURE.RESOURCE_SHORTAGE;
562 else
563 reason = CHANNEL_OPEN_FAILURE.CONNECT_FAILED;
564 }
565
566 if (localChan !== -1)
567 this._chanMgr.remove(localChan);
568 proto.channelOpenFail(info.sender, reason, '');
569 };
570 const reserveChannel = () => {
571 localChan = this._chanMgr.add();
572

Calls 2

removeMethod · 0.80
channelOpenFailMethod · 0.80

Tested by

no test coverage detected