[openrtm-commit:03281] r831 - trunk/rtmtools/jp.go.aist.rtm.nameserviceview/src/jp/go/aist/rtm/nameserviceview/ui/action
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 3月 26日 (月) 23:49:46 JST
Author: ga
Date: 2018-03-26 23:49:46 +0900 (Mon, 26 Mar 2018)
New Revision: 831
Modified:
trunk/rtmtools/jp.go.aist.rtm.nameserviceview/src/jp/go/aist/rtm/nameserviceview/ui/action/StartNameServiceAction.java
Log:
Modified to register to name service multiple times. #4492
Modified: trunk/rtmtools/jp.go.aist.rtm.nameserviceview/src/jp/go/aist/rtm/nameserviceview/ui/action/StartNameServiceAction.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.nameserviceview/src/jp/go/aist/rtm/nameserviceview/ui/action/StartNameServiceAction.java 2018-03-26 12:32:32 UTC (rev 830)
+++ trunk/rtmtools/jp.go.aist.rtm.nameserviceview/src/jp/go/aist/rtm/nameserviceview/ui/action/StartNameServiceAction.java 2018-03-26 14:49:46 UTC (rev 831)
@@ -2,6 +2,7 @@
import java.io.IOException;
+import jp.go.aist.rtm.nameserviceview.model.manager.NameServerContext;
import jp.go.aist.rtm.nameserviceview.model.manager.NameServerManager;
import jp.go.aist.rtm.nameserviceview.ui.dialog.PasswordDialog;
import jp.go.aist.rtm.nameserviceview.ui.views.nameserviceview.NameServiceView;
@@ -52,7 +53,16 @@
}
}
/////
- NameServerManager.eInstance.addNameServer("localhost");
+ //ネームサーバーの登録を複数回試行
+ for(int index=0; index<10; index++) {
+ NameServerContext server = NameServerManager.eInstance.addNameServer("localhost");
+ if(server!=null) break;
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
NameServerManager.eInstance.refreshAll();
}
openrtm-commit メーリングリストの案内