(self, c, cancel_consumers=True)
| 405 | self._close(c, False) |
| 406 | |
| 407 | def _close(self, c, cancel_consumers=True): |
| 408 | channels = set() |
| 409 | for consumer in self.consumers or []: |
| 410 | if cancel_consumers: |
| 411 | ignore_errors(c.connection, consumer.cancel) |
| 412 | if consumer.channel: |
| 413 | channels.add(consumer.channel) |
| 414 | for channel in channels: |
| 415 | ignore_errors(c.connection, channel.close) |