try { if (mySock != null ) mySock.close(); if (LogWriter.needsLogging) stack.logWriter.logMessage ("Closing message Channel " + this); } catch (IOException ex) { if (LogWriter.needsLogging) stack.logWriter.logMessage ("Error closing socket " + ex); } }
try { if (mySock != null) mySock.close(); if (sipStack.isLoggingEnabled()) sipStack.logWriter.logDebug("Closing message Channel " + this); } catch (IOException ex) { if (sipStack.isLoggingEnabled()) sipStack.logWriter.logDebug("Error closing socket " + ex); } }
    public void close() {        try {            if (mySock != null ) mySock.close();            if (LogWriter.needsLogging)                stack.logWriter.logMessage                ("Closing message Channel " + this);        } catch (IOException ex) {            if (LogWriter.needsLogging)                stack.logWriter.logMessage                ("Error closing socket " + ex);        }    }