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