equal
deleted
inserted
replaced
52 import java.util.Set; |
52 import java.util.Set; |
53 import java.util.concurrent.locks.ReentrantLock; |
53 import java.util.concurrent.locks.ReentrantLock; |
54 |
54 |
55 import sun.net.NetHooks; |
55 import sun.net.NetHooks; |
56 import sun.net.ext.ExtendedSocketOptions; |
56 import sun.net.ext.ExtendedSocketOptions; |
|
57 import sun.net.util.SocketExceptions; |
57 import static sun.net.ext.ExtendedSocketOptions.SOCK_STREAM; |
58 import static sun.net.ext.ExtendedSocketOptions.SOCK_STREAM; |
58 |
59 |
59 /** |
60 /** |
60 * An implementation of SocketChannels |
61 * An implementation of SocketChannels |
61 */ |
62 */ |
704 readLock.unlock(); |
705 readLock.unlock(); |
705 } |
706 } |
706 } catch (IOException ioe) { |
707 } catch (IOException ioe) { |
707 // connect failed, close the channel |
708 // connect failed, close the channel |
708 close(); |
709 close(); |
709 throw ioe; |
710 throw SocketExceptions.of(ioe, isa); |
710 } |
711 } |
711 } |
712 } |
712 |
713 |
713 /** |
714 /** |
714 * Marks the beginning of a finishConnect operation that might block. |
715 * Marks the beginning of a finishConnect operation that might block. |
790 readLock.unlock(); |
791 readLock.unlock(); |
791 } |
792 } |
792 } catch (IOException ioe) { |
793 } catch (IOException ioe) { |
793 // connect failed, close the channel |
794 // connect failed, close the channel |
794 close(); |
795 close(); |
795 throw ioe; |
796 throw SocketExceptions.of(ioe, remoteAddress); |
796 } |
797 } |
797 } |
798 } |
798 |
799 |
799 /** |
800 /** |
800 * Invoked by implCloseChannel to close the channel. |
801 * Invoked by implCloseChannel to close the channel. |