public static boolean close(final Socket socket) {
    if (socket != null) {
      try {
        socket.close();
      } catch (IOException ignore) {
        return false;
      }
    }

    return true;
  }
Closes the specified Socket silently ignoring any IOException, guarding against null Object
references.
<p>

@param socket the Socket to close.
@return boolean value indicating whether the Socket was successfully closed. If the Socket
        Object reference is null, then this method will return true.
@see java.net.Socket#close()
geode-core/src/main/java/org/apache/geode/internal/net/SocketUtils.java