From 451daea8f401ab07daecb6d92d8615f486893f06 Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Mon, 17 Mar 2014 10:07:13 +0000 Subject: [PATCH] 8037346: Need to terminate server process if client runs into problems Reviewed-by: weijun --- .../www/protocol/https/HttpsURLConnection/PostThruProxy.java | 3 ++- .../https/HttpsURLConnection/PostThruProxyWithAuth.java | 3 ++- .../sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java index 2ad8a0fde0b..2ad4ba58623 100644 --- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java +++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, 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 @@ -98,6 +98,7 @@ public class PostThruProxy { ServerSocketFactory ssf = PostThruProxy.getServerSocketFactory(useSSL); ServerSocket ss = ssf.createServerSocket(serverPort); + ss.setSoTimeout(30000); // 30 seconds serverPort = ss.getLocalPort(); new TestServer(ss); } catch (Exception e) { diff --git a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java index 1a505ac1f34..4572d0852f0 100644 --- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java +++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, 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 @@ -100,6 +100,7 @@ public class PostThruProxyWithAuth { ServerSocketFactory ssf = PostThruProxyWithAuth.getServerSocketFactory(useSSL); ServerSocket ss = ssf.createServerSocket(serverPort); + ss.setSoTimeout(30000); // 30 seconds serverPort = ss.getLocalPort(); new TestServer(ss); } catch (Exception e) { diff --git a/jdk/test/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.java b/jdk/test/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.java index bdc11f0e5a1..af9ad60296a 100644 --- a/jdk/test/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.java +++ b/jdk/test/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, 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 @@ -88,6 +88,7 @@ public class NotifyHandshakeTest implements HandshakeCompletedListener { */ SSLServerSocket sslss = (SSLServerSocket)sslssf.createServerSocket(serverPort); + sslss.setSoTimeout(30000); // 30 seconds serverPort = sslss.getLocalPort(); Server server = new Server(sslss); server.start();