utils: improve timeout to 60s, define generics properly Signed-off-by: Rohit Yadav <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d2471df0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d2471df0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d2471df0 Branch: refs/heads/4.5 Commit: d2471df0be35c9af928c682c961ac0544b347159 Parents: 5599dee Author: Rohit Yadav <[email protected]> Authored: Mon Apr 13 15:31:42 2015 +0530 Committer: Rohit Yadav <[email protected]> Committed: Mon Apr 13 15:44:09 2015 +0530 ---------------------------------------------------------------------- utils/src/com/cloud/utils/nio/Link.java | 2 +- utils/src/org/apache/cloudstack/utils/security/SSLUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2471df0/utils/src/com/cloud/utils/nio/Link.java ---------------------------------------------------------------------- diff --git a/utils/src/com/cloud/utils/nio/Link.java b/utils/src/com/cloud/utils/nio/Link.java index 971c253..ddfd474 100755 --- a/utils/src/com/cloud/utils/nio/Link.java +++ b/utils/src/com/cloud/utils/nio/Link.java @@ -466,7 +466,7 @@ public class Link { ByteBuffer out_pkgBuf = ByteBuffer.allocate(sslSession.getPacketBufferSize() + 40); ByteBuffer out_appBuf = ByteBuffer.allocate(sslSession.getApplicationBufferSize() + 40); int count; - ch.socket().setSoTimeout(30 * 1000); + ch.socket().setSoTimeout(60 * 1000); InputStream inStream = ch.socket().getInputStream(); // Use readCh to make sure the timeout on reading is working ReadableByteChannel readCh = Channels.newChannel(inStream); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2471df0/utils/src/org/apache/cloudstack/utils/security/SSLUtils.java ---------------------------------------------------------------------- diff --git a/utils/src/org/apache/cloudstack/utils/security/SSLUtils.java b/utils/src/org/apache/cloudstack/utils/security/SSLUtils.java index 5ea89b1..c1fc2d6 100644 --- a/utils/src/org/apache/cloudstack/utils/security/SSLUtils.java +++ b/utils/src/org/apache/cloudstack/utils/security/SSLUtils.java @@ -32,7 +32,7 @@ public class SSLUtils { public static final Logger s_logger = Logger.getLogger(SSLUtils.class); public static String[] getSupportedProtocols(String[] protocols) { - Set set = new HashSet(); + Set<String> set = new HashSet<String>(); for (String s : protocols) { if (s.equals("SSLv3") || s.equals("SSLv2Hello")) { continue;
