(self, recipient, info, cb)
| 5 | const MAX_CHANNEL = 2 ** 32 - 1; |
| 6 | |
| 7 | function onChannelOpenFailure(self, recipient, info, cb) { |
| 8 | self._chanMgr.remove(recipient); |
| 9 | if (typeof cb !== 'function') |
| 10 | return; |
| 11 | |
| 12 | let err; |
| 13 | if (info instanceof Error) { |
| 14 | err = info; |
| 15 | } else if (typeof info === 'object' && info !== null) { |
| 16 | err = new Error(`(SSH) Channel open failure: ${info.description}`); |
| 17 | err.reason = info.reason; |
| 18 | } else { |
| 19 | err = new Error( |
| 20 | '(SSH) Channel open failure: server closed channel unexpectedly' |
| 21 | ); |
| 22 | err.reason = ''; |
| 23 | } |
| 24 | |
| 25 | cb(err); |
| 26 | } |
| 27 | |
| 28 | function onCHANNEL_CLOSE(self, recipient, channel, err, dead) { |
| 29 | if (typeof channel === 'function') { |
no test coverage detected
searching dependent graphs…