This commit is contained in:
rusefi 2017-09-18 08:00:10 -04:00
parent 5a6f42d1fa
commit e26f1907ab
3 changed files with 6 additions and 4 deletions

View File

@ -436,7 +436,7 @@ public class BinaryProtocol implements BinaryProtocolCommands {
/**
* This method blocks until a confirmation is received
* This method blocks until a confirmation is received or {@link Timeouts#BINARY_IO_TIMEOUT} is reached
*
* @return true in case of timeout, false if got proper confirmation
*/

View File

@ -41,12 +41,12 @@ public class IncomingDataBuffer {
}
/**
* Blocking method which would for specified amout of data
* Blocking method which would wait for specified amount of data
*
* @return true in case of timeout, false if everything is fine
*/
public boolean waitForBytes(String msg, long startTimestamp, int count) throws InterruptedException {
logger.info("Waiting for " + count + " byte(s): " + msg);
public boolean waitForBytes(String loggingMessage, long startTimestamp, int count) throws InterruptedException {
logger.info(loggingMessage + ": waiting for " + count + " byte(s)");
synchronized (cbb) {
while (cbb.length() < count) {
int timeout = (int) (startTimestamp + Timeouts.BINARY_IO_TIMEOUT - System.currentTimeMillis());

View File

@ -5,6 +5,8 @@ import java.net.ServerSocket;
import java.net.Socket;
/**
* This class is used to figure out if we have multiple instances of rusEfi console running
*
* (c) Andrey Belomutskiy
* 5/4/2015
*/