epee: fix potential hang on exit
epee: fix potential hang on exit

Also close sockets on failure, just in case

eiabea/bitmonero,ranok/bitmonero,ranok/bitmonero,ranok/bitmonero,ranok/bitmonero,eiabea/bitmonero,eiabea/bitmonero,eiabea/bitmonero,eiabea/bitmonero,eiabea/bitmonero,ranok/bitmonero,ranok/bitmonero