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

Socket.connect API should document whether the socket will be closed when hostname resolution fails or another error occurs

XMLWordPrintable

    • b27
    • Verified

      The new SocketImpl introduced under JEP 353 does not close the underlying socket when the connect method rejects an unresolved address. The old SocketImpl used to close the socket in this case, leaving the Socket open, but at least the underlying socket is released. We expect the implementation to do the same. Unlike SocketChannel.connect, Socket.connect does not document the behaviour when connect fails.

        There are no Sub-Tasks for this issue.

            vyazici Volkan Yazici
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: