@Override protected synchronized void close() throws IOException { if (closed) { return; } closed = true; if (fd.valid()) { NativeUnixSocket.shutdown(fd, SHUT_RD_WR); NativeUnixSocket.close(fd); } if (bound) { NativeUnixSocket.unlink(socketFile); } connected = false; }
@Override public void run() { try { if (boundEndpoint != null) { NativeUnixSocket.unlink(boundEndpoint.getSocketFile()); } } catch (IOException e) { // ignore } } };
@Override public void run() { try { if (boundEndpoint != null) { NativeUnixSocket.unlink(boundEndpoint.getSocketFile()); } } catch (IOException e) { // ignore } } };
@Override public void close() throws IOException { if (isClosed()) { return; } super.close(); implementation.close(); if (boundEndpoint != null) { NativeUnixSocket.unlink(boundEndpoint.getSocketFile()); } try { Runtime.getRuntime().removeShutdownHook(shutdownThread); } catch (IllegalStateException e) { // ignore } }
@Override public void close() throws IOException { if (isClosed()) { return; } super.close(); implementation.close(); if (boundEndpoint != null) { NativeUnixSocket.unlink(boundEndpoint.getSocketFile()); } try { Runtime.getRuntime().removeShutdownHook(shutdownThread); } catch (IllegalStateException e) { // ignore } }
@Override protected synchronized void close() throws IOException { if (closed) { return; } closed = true; if (fd.valid()) { NativeUnixSocket.shutdown(fd, SHUT_RD_WR); NativeUnixSocket.close(fd); } if (bound) { NativeUnixSocket.unlink(socketFile); } connected = false; }
@Override protected final synchronized void close() throws IOException { FileDescriptor fdesc = validFd(); if (fdesc != null) { NativeUnixSocket.shutdown(fdesc, SHUT_RD_WR); NativeUnixSocket.close(fdesc); } if (bound) { NativeUnixSocket.unlink(socketFile); } connected = false; closed = true; }
@Override protected synchronized void close() throws IOException { if (closed) { return; } closed = true; if (fd.valid()) { NativeUnixSocket.shutdown(fd, SHUT_RD_WR); NativeUnixSocket.close(fd); } if (bound) { NativeUnixSocket.unlink(socketFile); } connected = false; }