(id)
| 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 = {}; |
no outgoing calls
no test coverage detected