Mercurial > hg > openjdk > jdk7 > jdk
changeset 4010:e9ae2178926a
7036157: TCP connection does not use kdc_timeout
Reviewed-by: valeriep
author | weijun |
---|---|
date | Thu, 14 Apr 2011 12:40:30 +0800 |
parents | 65b6fe866a6f |
children | 2d89d0d1e0ff |
files | src/share/classes/sun/security/krb5/internal/NetClient.java |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/sun/security/krb5/internal/NetClient.java Wed Apr 13 16:12:49 2011 -0700 +++ b/src/share/classes/sun/security/krb5/internal/NetClient.java Thu Apr 14 12:40:30 2011 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,7 +59,8 @@ TCPClient(String hostname, int port, int timeout) throws IOException { - tcpSocket = new Socket(hostname, port); + tcpSocket = new Socket(); + tcpSocket.connect(new InetSocketAddress(hostname, port), timeout); out = new BufferedOutputStream(tcpSocket.getOutputStream()); in = new BufferedInputStream(tcpSocket.getInputStream()); tcpSocket.setSoTimeout(timeout);