This commit is contained in:
rusefi 2017-09-18 08:00:10 -04:00
parent 1b7ffd040b
commit f54da4c3d3
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 * @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 * @return true in case of timeout, false if everything is fine
*/ */
public boolean waitForBytes(String msg, long startTimestamp, int count) throws InterruptedException { public boolean waitForBytes(String loggingMessage, long startTimestamp, int count) throws InterruptedException {
logger.info("Waiting for " + count + " byte(s): " + msg); logger.info(loggingMessage + ": waiting for " + count + " byte(s)");
synchronized (cbb) { synchronized (cbb) {
while (cbb.length() < count) { while (cbb.length() < count) {
int timeout = (int) (startTimestamp + Timeouts.BINARY_IO_TIMEOUT - System.currentTimeMillis()); int timeout = (int) (startTimestamp + Timeouts.BINARY_IO_TIMEOUT - System.currentTimeMillis());

View File

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