Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8233313

server socket created by LocateRegistry.createRegistry(0) can not be closed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 14
    • core-libs
    • None
    • Fix Understood

      Registry registry = LocateRegistry.createRegistry(0);
      boolean b = UnicastRemoteObject.unexportObject(registry, true);

      b==true, but the underlying server socket is not closed by unexportObject, which is not right and is a resource leak.

      NOTE: for specific port other than 0, it can be closed by UnicastRemoteObject.unexportObject(registry, true);

            msheppar Mark Sheppard
            mli Hamlin Li
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: