Handle one request, without blocking. I assume that selector.select() has returned that the socket is readable before this function was called, so there should be no risk of blocking in get_request().
(self)
| 300 | return self.handle_timeout() |
| 301 | |
| 302 | def _handle_request_noblock(self): |
| 303 | """Handle one request, without blocking. |
| 304 | |
| 305 | I assume that selector.select() has returned that the socket is |
| 306 | readable before this function was called, so there should be no risk of |
| 307 | blocking in get_request(). |
| 308 | """ |
| 309 | try: |
| 310 | request, client_address = self.get_request() |
| 311 | except OSError: |
| 312 | return |
| 313 | if self.verify_request(request, client_address): |
| 314 | try: |
| 315 | self.process_request(request, client_address) |
| 316 | except Exception: |
| 317 | self.handle_error(request, client_address) |
| 318 | self.shutdown_request(request) |
| 319 | except: |
| 320 | self.shutdown_request(request) |
| 321 | raise |
| 322 | else: |
| 323 | self.shutdown_request(request) |
| 324 | |
| 325 | def handle_timeout(self): |
| 326 | """Called if no new request arrives within self.timeout. |
no test coverage detected