public void disconnect() { try { synchronized (this) { if (!connected) { return; } connected = false; } close(); eof_remote = eof_local = true; thread = null; try { if (io != null) { io.close(); } } catch (Exception e) { logger.log(Level.SEVERE, e.getMessage(), e); } } finally { Channel.del(this); } }
public void disconnect(){ //System.err.println(this+":disconnect "+io+" "+connected); //Thread.dumpStack(); synchronized(this){ if(!connected){ return; } connected=false; } close(); eof_remote=eof_local=true; thread=null; try{ if(io!=null){ io.close(); } } catch(Exception e){ //e.printStackTrace(); } io=null; Channel.del(this); }
public void disconnect(){ //System.err.println(this+":disconnect "+io+" "+connected); //Thread.dumpStack(); try{ synchronized(this){ if(!connected){ return; } connected=false; } close(); eof_remote=eof_local=true; thread=null; try{ if(io!=null){ io.close(); } } catch(Exception e){ //e.printStackTrace(); } // io=null; } finally{ Channel.del(this); } }
public void disconnect(){ //System.err.println(this+":disconnect "+io+" "+connected); //Thread.dumpStack(); try{ synchronized(this){ if(!connected){ return; } connected=false; } close(); eof_remote=eof_local=true; thread=null; try{ if(io!=null){ io.close(); } } catch(Exception e){ //e.printStackTrace(); } // io=null; } finally{ Channel.del(this); } }
/** * disconnects this channel. */ public void disconnect(){ //System.err.println(this+":disconnect "+io+" "+connected); //Thread.dumpStack(); try{ synchronized(this){ if(!connected){ return; } connected=false; } close(); eof_remote=eof_local=true; thread=null; try{ if(io!=null){ io.close(); } } catch(Exception e){ //e.printStackTrace(); } // io=null; } finally{ Channel.del(this); } }
public void connect(int connectTimeout) throws JSchException { this.connectTimeout = connectTimeout; try { Session _session = getSession(); if (!_session.isConnected()) { throw new JSchException("session is down"); } if (io.in != null) { thread = new Thread(this); thread.setName("DirectTCPIP thread " + _session.getHost()); if (_session.daemon_thread) { thread.setDaemon(true); } thread.start(); } else { sendChannelOpen(); } } catch (Exception e) { io.close(); io = null; Channel.del(this); if (e instanceof JSchException) { throw (JSchException) e; } } }
public void connect(int connectTimeout) throws JSchException{ this.connectTimeout=connectTimeout; try{ Session _session=getSession(); if(!_session.isConnected()){ throw new JSchException("session is down"); } if(io.in!=null){ thread=new Thread(this); thread.setName("DirectTCPIP thread "+_session.getHost()); if(_session.daemon_thread){ thread.setDaemon(_session.daemon_thread); } thread.start(); } else { sendChannelOpen(); } } catch(Exception e){ io.close(); io=null; Channel.del(this); if (e instanceof JSchException) { throw (JSchException) e; } } }
public void connect(int connectTimeout) throws JSchException{ this.connectTimeout=connectTimeout; try{ Session _session=getSession(); if(!_session.isConnected()){ throw new JSchException("session is down"); } if(io.in!=null){ thread=new Thread(this); thread.setName("DirectTCPIP thread "+_session.getHost()); if(_session.daemon_thread){ thread.setDaemon(_session.daemon_thread); } thread.start(); } else { sendChannelOpen(); } } catch(Exception e){ io.close(); io=null; Channel.del(this); if (e instanceof JSchException) { throw (JSchException) e; } } }
io.close(); io=null; Channel.del(this); if (e instanceof JSchException) { throw (JSchException) e;
io.close(); io=null; Channel.del(this); if (e instanceof JSchException) { throw (JSchException) e;