Mercurial > hg > RemoteEditor > REPSessionManager
diff rep/SessionManager.java @ 364:c965ef2b5fd6
*** empty log message ***
author | kono |
---|---|
date | Mon, 20 Oct 2008 13:44:34 +0900 |
parents | 1a8856580d38 |
children | c432755c3555 |
line wrap: on
line diff
--- a/rep/SessionManager.java Mon Oct 20 03:03:28 2008 +0900 +++ b/rep/SessionManager.java Mon Oct 20 13:44:34 2008 +0900 @@ -273,6 +273,7 @@ * After loop detection, we give up session manager join. */ private void cancel_sm_join() { + logger.writeLog("Loop detected "+this); removeChannel(sm_join_channel); sm_join_channel=null; } @@ -282,7 +283,7 @@ REPSelectionKey<REPCommand> key = channel.channel.keyFor1(selector); key.cancel(); try { - channel.channel.close(); + channel.channel.close1(); } catch (IOException e) { } } @@ -318,11 +319,10 @@ * ならない。複数のSession Managerにjoinすることは出来ない。(NATを実装するまでは)。 * @param host */ - public void connectSession(String host) { + public void connectSession(String host, int port) { if (sm_join_channel!=null) return; if (!sessionList.isEmpty()) return; if (!smList.isMaster()) return; - int port = parent_port; /* * IPv6 対応では、複数のアドレスを取って、それのすべてに接続を試す必要が * ある。 @@ -338,6 +338,10 @@ }catch (IOException e) { } } + + public void connectSession(String host) { + connectSession(host,parent_port); + } /** * channel に SMCMD_SM_JOIN command を送る。 @@ -790,4 +794,5 @@ return sessionList.get(sid); } + }