You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/03/02 08:11:57 UTC

[GitHub] [cloudstack] rhtyd commented on a change in pull request #3919: Handle EOFException during VR Health Check

rhtyd commented on a change in pull request #3919: Handle EOFException during VR Health Check
URL: https://github.com/apache/cloudstack/pull/3919#discussion_r386244391
 
 

 ##########
 File path: utils/src/main/java/com/cloud/utils/ssh/SshHelper.java
 ##########
 @@ -184,12 +185,11 @@ public static void scpTo(String host, int port, String user, File pemKeyFile, St
 
             sess.execCommand(command);
 
-            InputStream stdout = sess.getStdout();
-            InputStream stderr = sess.getStderr();
-
-            byte[] buffer = new byte[8192];
-            StringBuffer sbResult = new StringBuffer();
+            StreamGobbler stdout = new StreamGobbler(sess.getStdout());
+            StreamGobbler stderr = new StreamGobbler(sess.getStderr());
 
+            byte[] buffer = new byte[16384];
+            StringBuffer sbResult = new StringBuffer(214748364);
 
 Review comment:
   @Pearl1594 what's this magic number? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services