update network error detection as described by rb07 in https://trac.transmissionbt.com/ticket/5514#comment:9

git-svn-id: svn://svn.transmissionbt.com/Transmission/trunk@14273 f4695dd4-2c0a-0410-b89c-da849a56a58e