On connection timeout, POP3 grabber fails with an unhandled AttributeError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Quotient |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
This traceback shows up in my logs sometimes:
2012-05-10 14:40:57-0400 [ControlledPOP3
Traceback (most recent call last):
File "/home/
File "/home/
File "/home/
File "/home/
RunCallbacks
File "/home/
llbacks
File "/home/
--- <exception caught here> ---
File "/home/
result = g.next()
File "/home/
File "/home/
Looking at the code, it seems the likely explanation is that the connection times out (a frequent occurrence on my net connection/server). `timeoutConnection` calls `stoppedRunning`. `stoppedRunning` sets `self.grabber` to `None` (a recent improvement, as previously it would choke on a scheduler problem before getting there, now fixed). `timeoutConnection` then calls `loseConnection` which eventually causes the connection to be lost, resulting in `connectionLost`, causing one of the Deferreds waited on in `_grab` to fail. This leads to a `setStatus` call which fails because the `grabber` attribute was discarded already.
Related branches
- Tristan Seligmann: Approve
-
Diff: 144 lines (+75/-18)2 files modifiedQuotient/xquotient/grabber.py (+5/-3)
Quotient/xquotient/test/test_grabber.py (+70/-15)
Changed in quotient: | |
status: | New → Fix Committed |