(self)
| 57 | # |
| 58 | |
| 59 | def _cleanupPendingRequests(self): |
| 60 | if self.factory.instance == self: |
| 61 | now = time.time() |
| 62 | to_remove = [] |
| 63 | for mid, r in self.pending_requests.items(): |
| 64 | if r.expiry_time < now: |
| 65 | try: |
| 66 | r.errback(SMBTimeout()) |
| 67 | except Exception: pass |
| 68 | to_remove.append(mid) |
| 69 | |
| 70 | for mid in to_remove: |
| 71 | del self.pending_requests[mid] |
| 72 | |
| 73 | reactor.callLater(1, self._cleanupPendingRequests) |
| 74 | |
| 75 | |
| 76 | class SMBProtocolFactory(ClientFactory): |
nothing calls this directly
no test coverage detected