void () { DataOutputStream os = null; try { if (mySocket == null || mySocket.isClosed()) return; os = new DataOutputStream(mySocket.getOutputStream()); os.writeBoolean(true); } catch (Throwable e) { LOG.info(e); } finally { try { if (os != null) os.close(); } catch (Throwable e) { LOG.info(e); } try { if (!myServerSocket.isClosed()) { myServerSocket.close(); } } catch (Throwable e) { LOG.info(e); } } }