jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java
changeset 12440 2689ca179e22
parent 9679 d98ae8bc45fc
child 12683 5c743840dd8a
equal deleted inserted replaced
12439:07ab7fcb2f08 12440:2689ca179e22
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   814             // Close the underlying file descriptor and dup it to a known fd
   814             // Close the underlying file descriptor and dup it to a known fd
   815             // that's already closed.  This prevents other operations on this
   815             // that's already closed.  This prevents other operations on this
   816             // channel from using the old fd, which might be recycled in the
   816             // channel from using the old fd, which might be recycled in the
   817             // meantime and allocated to an entirely different channel.
   817             // meantime and allocated to an entirely different channel.
   818             //
   818             //
   819             nd.preClose(fd);
   819             if (state != ST_KILLED)
       
   820                 nd.preClose(fd);
   820 
   821 
   821             // Signal native threads, if needed.  If a target thread is not
   822             // Signal native threads, if needed.  If a target thread is not
   822             // currently blocked in an I/O operation then no harm is done since
   823             // currently blocked in an I/O operation then no harm is done since
   823             // the signal handler doesn't actually do anything.
   824             // the signal handler doesn't actually do anything.
   824             //
   825             //