Better caching for renter-host protocol sessions
We currently have reference counting in the Downloader
and Editor
code but I don't think that they are actually reusing connections. The reason being that every host only has a single worker connecting to it. So every time the worker closes a Download
/Editor
the reference counter drops to 0 and the sessions gets closed. At default redundancy settings this happens about 25 times for each individual connection on a 1GB file upload/download.
We should figure out how to improve that to get actual caching and reuse sessions at least between chunks of the same upload/download.