[ https://issues.apache.org/jira/browse/ZOOKEEPER-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14608803#comment-14608803 ]
Raul Gutierrez Segales commented on ZOOKEEPER-2224: --------------------------------------------------- Thanks for the patch [~arshad.mohammad]! A few comments: In: {code} public static String send4LetterWord(String host, int port, String cmd) throws IOException, SSLContextException { - return send4LetterWord(host, port, cmd, false); + return send4LetterWord(host, port, cmd, false, 5000); {code} why not use DEFAUL_SOCKET_TIMEOUT instead of 5000? Nit in: {code} + //in millisecond, socket should connect/read within this period otherwise SocketTimeoutException {code} *milliseconds In: {code} + }catch (SocketTimeoutException e) + { + throw new IOException(e); {code} please use proper spacing and { on the same line as catch: {code} + } catch (SocketTimeoutException e) { + throw new IOException(e); {code} In: {code} + String resp = sendRequest("isro",2000); {code} space between "isro", and 2000. Thanks! > Four letter command hangs when network is slow > ---------------------------------------------- > > Key: ZOOKEEPER-2224 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2224 > Project: ZooKeeper > Issue Type: Bug > Reporter: Arshad Mohammad > Assignee: Arshad Mohammad > Priority: Minor > Fix For: 3.6.0 > > Attachments: ZOOKEEPER-2224-01.patch > > > Four letter command hangs when network is slow or network goes down in > between the operation, and the application also, which calling this four > letter command, hangs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)