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

Method remove

lib/utils.js:179–188  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

177 return this._channels[id];
178 }
179 remove(id) {
180 if (typeof id !== 'number' || id < 0 || id >= MAX_CHANNEL || !isFinite(id))
181 throw new Error(`Invalid channel id: ${id}`);
182
183 if (this._channels[id]) {
184 delete this._channels[id];
185 if (this._count)
186 --this._count;
187 }
188 }
189 cleanup(err) {
190 const channels = this._channels;
191 this._channels = {};

Callers 4

rejectFunction · 0.80
onChannelOpenFailureFunction · 0.80
onCHANNEL_CLOSEFunction · 0.80
rejectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected