MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _cleanupPendingRequests

Method _cleanupPendingRequests

pager_lib/smb/SMBProtocol.py:59–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
76class SMBProtocolFactory(ClientFactory):

Callers

nothing calls this directly

Calls 3

SMBTimeoutClass · 0.85
appendMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected