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); } }