浏览代码

change fwupdate_admin. not complete.

yuchuli 1 年之前
父节点
当前提交
09f9c1376f
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      src/tool/fwupdate_admin/grpcfwclient.cpp

+ 10 - 0
src/tool/fwupdate_admin/grpcfwclient.cpp

@@ -82,6 +82,16 @@ void grpcfwclient::threadrpc()
 
               stub_ = iv::CommonRPC::NewStub(channel);
           }
+
+          if(status.error_code() == 14)
+          {
+              std::cout<<" Code 14, Create New stub_"<<std::endl;
+              channel = grpc::CreateCustomChannel(
+                       target_str, grpc::InsecureChannelCredentials(),cargs);
+
+              stub_ = iv::CommonRPC::NewStub(channel);
+          }
+
           std::this_thread::sleep_for(std::chrono::milliseconds(900));
 
         }