(int connectTimeout)
| 55 | } |
| 56 | |
| 57 | public void connect(int connectTimeout) throws JSchException{ |
| 58 | this.connectTimeout=connectTimeout; |
| 59 | try{ |
| 60 | Session _session=getSession(); |
| 61 | if(!_session.isConnected()){ |
| 62 | throw new JSchException("session is down"); |
| 63 | } |
| 64 | |
| 65 | if(io.in!=null){ |
| 66 | thread=new Thread(this); |
| 67 | thread.setName("DirectTCPIP thread "+_session.getHost()); |
| 68 | if(_session.daemon_thread){ |
| 69 | thread.setDaemon(_session.daemon_thread); |
| 70 | } |
| 71 | thread.start(); |
| 72 | } |
| 73 | else { |
| 74 | sendChannelOpen(); |
| 75 | } |
| 76 | } |
| 77 | catch(Exception e){ |
| 78 | io.close(); |
| 79 | io=null; |
| 80 | Channel.del(this); |
| 81 | if (e instanceof JSchException) { |
| 82 | throw (JSchException) e; |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | public void run(){ |
| 88 |
no test coverage detected