Rebuild session on socket.gaierror (code: 8)