(self, force=True)
| 642 | return self |
| 643 | |
| 644 | def close(self, force=True): |
| 645 | if not force: |
| 646 | warnings.warn("force parameter should be True", DeprecationWarning, |
| 647 | stacklevel=2) |
| 648 | if self._closed: |
| 649 | return |
| 650 | |
| 651 | self._closed = True |
| 652 | |
| 653 | if hasattr(self._loop, 'is_closed'): |
| 654 | if self._loop.is_closed(): |
| 655 | return |
| 656 | |
| 657 | if self._connection is not None: |
| 658 | self._connection.close() |
| 659 | self._connection = None |
| 660 | self._cleanup_writer() |
| 661 | |
| 662 | @asyncio.coroutine |
| 663 | def release(self): |