提交 9230cbbd 编写于 作者: I igerasim

8037346: Need to terminate server process if client runs into problems

Reviewed-by: weijun
上级 f8604e48
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -88,6 +88,7 @@ public class NotifyHandshakeTest implements HandshakeCompletedListener { ...@@ -88,6 +88,7 @@ public class NotifyHandshakeTest implements HandshakeCompletedListener {
*/ */
SSLServerSocket sslss = SSLServerSocket sslss =
(SSLServerSocket)sslssf.createServerSocket(serverPort); (SSLServerSocket)sslssf.createServerSocket(serverPort);
sslss.setSoTimeout(30000); // 30 seconds
serverPort = sslss.getLocalPort(); serverPort = sslss.getLocalPort();
Server server = new Server(sslss); Server server = new Server(sslss);
server.start(); server.start();
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -98,6 +98,7 @@ public class PostThruProxy { ...@@ -98,6 +98,7 @@ public class PostThruProxy {
ServerSocketFactory ssf = ServerSocketFactory ssf =
PostThruProxy.getServerSocketFactory(useSSL); PostThruProxy.getServerSocketFactory(useSSL);
ServerSocket ss = ssf.createServerSocket(serverPort); ServerSocket ss = ssf.createServerSocket(serverPort);
ss.setSoTimeout(30000); // 30 seconds
serverPort = ss.getLocalPort(); serverPort = ss.getLocalPort();
new TestServer(ss); new TestServer(ss);
} catch (Exception e) { } catch (Exception e) {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -100,6 +100,7 @@ public class PostThruProxyWithAuth { ...@@ -100,6 +100,7 @@ public class PostThruProxyWithAuth {
ServerSocketFactory ssf = ServerSocketFactory ssf =
PostThruProxyWithAuth.getServerSocketFactory(useSSL); PostThruProxyWithAuth.getServerSocketFactory(useSSL);
ServerSocket ss = ssf.createServerSocket(serverPort); ServerSocket ss = ssf.createServerSocket(serverPort);
ss.setSoTimeout(30000); // 30 seconds
serverPort = ss.getLocalPort(); serverPort = ss.getLocalPort();
new TestServer(ss); new TestServer(ss);
} catch (Exception e) { } catch (Exception e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册