You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the program is running, I don't know under what circumstances there will be a session connection that keeps opening. In the following code, the value of len has been consistently -1, and running this loop has caused the CPU to remain high. How do I solve this problem while (true) { byte data[] = new byte[1024]; int len = inputStream.read(data); if (len != -1) { byte[] data1 = Arrays.copyOfRange(data, 0, len); TextMessage textMessage = new TextMessage(data1); if (initValid && isValidBash(textMessage, shellPath)) { break; } else { tryBash = true; initValid = false; } session.sendMessage(textMessage); } }
The text was updated successfully, but these errors were encountered:
When the program is running, I don't know under what circumstances there will be a session connection that keeps opening. In the following code, the value of len has been consistently -1, and running this loop has caused the CPU to remain high. How do I solve this problem
while (true) { byte data[] = new byte[1024]; int len = inputStream.read(data); if (len != -1) { byte[] data1 = Arrays.copyOfRange(data, 0, len); TextMessage textMessage = new TextMessage(data1); if (initValid && isValidBash(textMessage, shellPath)) { break; } else { tryBash = true; initValid = false; } session.sendMessage(textMessage); } }
The text was updated successfully, but these errors were encountered: