catch socket.timeout also