bitcoin/bitcoin — pull request #2419 by sipa (2013-03-28 23:58:41+00:00)
Title: Drop release times for CNode

It seems there were two mechanisms for assessing whether a CNode was still in use: a refcount and a release timestamp. The latter seems to have been there for a long time, as a safety mechanism.

However, this timer also keeps CNode objects alive for far longer than necessary after disconnects, potentially opening up a DoS window.

This commit removes the timestamp-based mechanism, and replaces it with an assert(nRefCount >= 0), to verify that the refcounting is indeed correctly working.