twisted/klein — pull request #11 by dreid (2013-03-12 03:30:53+00:00)
Title: Request.finish called on a request after its connection was lost

Hi,

Thanks for Klein, it's really nice! I'm having an issue with requests failing because connections are closed before the response is finished. That leads to the following exception:

```
exceptions.RuntimeError: Request.finish called on a request after its
connection was lost; use Request.notifyFinish to keep track of this.
```

Normally I would handle that exception by doing

```
request.notifyFinish().addErrback(lambda f: d.cancel())
```

But this doesn't seem to work with Klein, since Klein adds both a callback and an errback that try to write useful information to the request. Of course I could just ignore it, but the error pollutes my logs and steal my attention from real errors. Have you encountered this problem, and if so, how do you handle it?