if(ping_sock != null) { try { OutputStream out=ping_sock.getOutputStream(); if(out != null) { out.write(NORMAL_TERMINATION); out.flush(); } } catch(Throwable t) { if(trace) log.trace("problem terminating ping socket", t); } }
sendPingSignal(NORMAL_TERMINATION);
    synchronized void sendPingTermination() {        if(ping_sock != null) {            try {                OutputStream out=ping_sock.getOutputStream();                if(out != null) {                    out.write(NORMAL_TERMINATION);                    out.flush();                }            }            catch(Throwable t) {                if(trace)                    log.trace("problem terminating ping socket", t);            }        }    }