JDK-4072256 : Win32 socket.accept() is not interruptible
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.1.3,1.1.4,1.1.5
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,windows_95,windows_nt
  • CPU: generic,x86
  • Submitted: 1997-08-15
  • Updated: 2000-12-21
  • Resolved: 2000-12-21
Related Reports
Duplicate :  
Duplicate :  
Description

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. 
======================================================================

Comments
WORK AROUND Name: rlT66838 Date: 08/15/97 None That I Can Think Of ======================================================================
11-06-2004

EVALUATION Contingent upon the implementation of asynchronous I/O. yingxian.wang@eng 2000-01-13 I am closing this bug as a duplicate of 4154947. alan.bateman@ireland 2000-12-21
13-01-2000