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

git-svn-id: file:///data/workdir/Transmission-svn//trunk@14273 1bcf1a7e-6170-4b50-b784-84ec52b2dec6