(self)
| 260 | raise RuntimeError("Invalid state: reading should be paused") |
| 261 | |
| 262 | async def restore(self): |
| 263 | self._transport.set_protocol(self._proto) |
| 264 | if self._should_resume_reading: |
| 265 | self._transport.resume_reading() |
| 266 | if self._write_ready_fut is not None: |
| 267 | # Cancel the future. |
| 268 | # Basically it has no effect because protocol is switched back, |
| 269 | # no code should wait for it anymore. |
| 270 | self._write_ready_fut.cancel() |
| 271 | if self._should_resume_writing: |
| 272 | self._proto.resume_writing() |
| 273 | |
| 274 | |
| 275 | class Server(events.AbstractServer): |
no test coverage detected