capture IOError in send_request to avoid "SocketError: error(54, 'Connection reset by peer')" when the connection has been idle for some time