Closes all available channels
4253
protected function closeChannels()
    {
        foreach ($this->channels as $key => $channel) {
            // channels[0] is this connection object, so don't close it yet
            if ($key === 0) {
                continue;
            }
            try {
                $channel->close();
            } catch (\Exception $e) {
                /* Ignore closing errors */
            }
        }
    }
780365
def close(self):
        
        if self.channel is not None: self.channel.close()
        if self.__connection is not None: self.__connection.close()
503727
def channels_close(self, room_id, **kwargs):
        """"""
        return self.__call_api_post('channels.close', roomId=room_id, kwargs=kwargs)
1024495
void channelCloses(final SynchronizeFXTomcatChannel synchronizeFXTomcatChannel) {
        synchronized (channels) {
            if (isCurrentlyShutingDown) {
                return;
            }
        }
        synchronized (channels) {
            // Maybe a bit inefficient but the alternative would be to pass cannelName and SynchronizeFxServer to the
            // channel just to be able to close itself.
            final Iterator<Entry<String, SynchronizeFXTomcatChannel>> channelIterator = channels.entrySet().iterator();
            while (channelIterator.hasNext()) {
                if (channelIterator.next().getValue().equals(synchronizeFXTomcatChannel)) {
                    channelIterator.remove();
                }
            }

            final Iterator<Entry<SynchronizeFxServer, SynchronizeFXTomcatChannel>> serverIterator =
                    servers.entrySet().iterator();
            while (serverIterator.hasNext()) {
                if (serverIterator.next().getValue().equals(synchronizeFXTomcatChannel)) {
                    serverIterator.remove();
                }
            }
        }
    }
224427
def close(self):
        """"""
        if self._channel and not self._channel.handler.channel_close:
            self._channel.close()
        self._channel_ref = None
1082504
public function close()
    {
        $outputFrame = ProtocolChannel\ChannelCloseFrame::create(
            0,//@todo replyCode
            'Channel closed by client'
        );
        $outputFrame->frameChannelId = $this->id;
        $this->connection->command($outputFrame);
    }
178710
public void close() throws IOException {
                if (channel != null && channel.isOpen()) {
                        channel.close();
                }
                channel = null;
                header = null;
        }
67662
function close() {
            var all = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0];

            return Channel.close(this, all);
        }
249429
def delete_channel(self, chname):
        """"""
        name = chname.lower()

        if len(self.channel_names) < 1:
            self.logger.error('Delete channel={0} failed. '
                              'No channels left.'.format(chname))
            return

        with self.lock:
            channel = self.channel[name]

            # Close local plugins open on this channel
            self.close_plugins(channel)

            try:
                idx = self.channel_names.index(chname)
            except ValueError:
                idx = 0

            # Update the channels control
            self.channel_names.remove(channel.name)
            self.channel_names.sort()

            self.ds.remove_tab(chname)
            del self.channel[name]
            self.prefs.remove_settings('channel_' + chname)

            # pick new channel
            num_channels = len(self.channel_names)
            if num_channels > 0:
                if idx >= num_channels:
                    idx = num_channels - 1
                self.change_channel(self.channel_names[idx])
            else:
                self.cur_channel = None

        self.make_gui_callback('delete-channel', channel)
266052
private void releaseAllChannelResources() {
		for (int i = 0; i < this.inputGates.size(); i++) {
			this.inputGates.get(i).releaseAllChannelResources();
		}

		for (int i = 0; i < this.outputGates.size(); i++) {
			this.outputGates.get(i).releaseAllChannelResources();
		}
	}
1186188
public void close() {
		for (Entry<String, OResourcePool<String, CH>> pool : pools.entrySet()) {
			for (CH channel : pool.getValue().getResources()) {
				channel.close();
			}
		}
	}
1351661
def stop(self):
        
        self._stop.set()
        if self._channel is not None:
            self._channel.close()
1153760
def channels_leave(self, room_id, **kwargs):
        """"""
        return self.__call_api_post('channels.leave', roomId=room_id, kwargs=kwargs)
321746
@Override
  public void close() {
    if (closed) return;
    
    closed = true;
    
    try {
      channel.close();
    } catch (Exception e) {
      logger.log("Failed to close channel for: '" + name + "'", e);
    }
  }
615036
public void closeChannel(int channelId) {
        if (log.isTraceEnabled()) {
            log.trace("closeChannel: {}", channelId);
        }
        Channel chan = channels.remove(channelId);
        if (log.isTraceEnabled()) {
            log.trace("channel: {} for id: {}", chan, channelId);
            if (chan == null) {
                log.trace("Channels: {}", channels);
            }
        }
        /*
        ReceivedMessageTaskQueue queue = tasksByChannels.remove(channelId);
        if (queue != null) {
            if (isConnected()) {
                // if connected, drain and process the tasks queued-up
                log.debug("Processing remaining tasks at close for channel: {}", channelId);
                processTasksQueue(queue);
            }
            queue.removeAllTasks();
        } else if (log.isTraceEnabled()) {
            log.trace("No task queue for id: {}", channelId);
        }
        */
        chan = null;
    }
353277
def _do_close(self):
        """"""
        AMQP_LOGGER.debug('Closed channel #%d', self.channel_id)
        self.is_open = False
        channel_id, self.channel_id = self.channel_id, None
        connection, self.connection = self.connection, None
        if connection:
            connection.channels.pop(channel_id, None)
            connection._avail_channel_ids.append(channel_id)
        self.callbacks.clear()
        self.cancel_callbacks.clear()
        self.events.clear()
        self.no_ack_consumers.clear()
1119960
def close(self):
        """"""
        for channel in self._listening_to:
            self.toredis.unsubscribe(channel)
        self.toredis.unsubscribe(self.group_pubsub)