(self, transp)
| 208 | |
| 209 | class _SendfileFallbackProtocol(protocols.Protocol): |
| 210 | def __init__(self, transp): |
| 211 | if not isinstance(transp, transports._FlowControlMixin): |
| 212 | raise TypeError("transport should be _FlowControlMixin instance") |
| 213 | self._transport = transp |
| 214 | self._proto = transp.get_protocol() |
| 215 | self._should_resume_reading = transp.is_reading() |
| 216 | self._should_resume_writing = transp._protocol_paused |
| 217 | transp.pause_reading() |
| 218 | transp.set_protocol(self) |
| 219 | if self._should_resume_writing: |
| 220 | self._write_ready_fut = self._transport._loop.create_future() |
| 221 | else: |
| 222 | self._write_ready_fut = None |
| 223 | |
| 224 | async def drain(self): |
| 225 | if self._transport.is_closing(): |
nothing calls this directly
no test coverage detected