Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2564

Invocation of stop on the embedded Sun JDK HttpServer seems to delay connections being closed in Windows

    Details

      Description

      The org.jboss.resteasy.plugins.server.sun.http.SunHttpJaxrsServer uses the com.sun.net.httpserver.HttpServer as the backing server. The HttpServer.stop(int) method was set to use 0 for the delay. On Windows this seems to take longer to actually close than expected. During tests there may be an attempt to start a new server before the previous one actually closes the connection.

      There are two ways this could be fix.

      1. We use an arbitrary 10 second delay like the VertxJaxrsServer does.
      2. We support a timeout passed to the constructor which would then be passed as the delay to the HttpServer.stop() method.
        • Note That if we use this approach it should likely be supported for the other EmbeddedJaxrsServer's

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jamezp James Perkins
                Reporter:
                jamezp James Perkins
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: