Fixed this issue, as well as handling socket.timeout errors correctly in 57dee7ac34ccce00becdd2e0f770b2a3990f3fe9 and the ticket for it is [#8360](https://trac.torproject.org/projects/tor/ticket/8360).