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

Win32 socket.accept() is not interruptible

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.1.3, 1.1.4, 1.1.5
    • core-libs
    • generic, x86
    • generic, windows_95, windows_nt



      Name: rlT66838 Date: 08/15/97


      This is the code that performs the interrupt():

         server.interrupt();
         synchronized(sock) {
            try {
               sock.close();
            }
            catch(Exception e) {
               System.err.println("Error Closing Socket");
            }
         }

      This is the code that it's interrupting:

         try {
            synchronized(sock) {
               while(true) {
                  if(!gateways.empty())
                     gateway = (HTTPGateway)gateways.remove();
                  else {
                     gateway = new HTTPGateway(this, kernel, props, keepalive, linger, timeout);
                     gateway.queueConnection();
                  }
                  gateway.init(sock.accept());
               }
            }
         }
         catch(Exception e) {
            System.err.println("Service Interrupted");
         }

      The interrupt should always be happening in the sock.accept()
      statement but it doesn't.
      ======================================================================

            alanb Alan Bateman
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: