fix panic error when the server become unreachable during the initialization