rusEFI console should not close on disconnect fix #4008

This commit is contained in:
rusefi 2022-03-23 15:09:24 -04:00
parent 30dc9bb16d
commit fbf58d7020
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import com.devexperts.logging.Logging;
import com.fazecast.jSerialComm.SerialPort;
import com.rusefi.binaryprotocol.IncomingDataBuffer;
import com.rusefi.io.IoStream;
import org.jetbrains.annotations.Nullable;
import static com.devexperts.logging.Logging.getLogging;
@ -34,9 +35,12 @@ public class BufferedSerialIoStream extends SerialIoStream {
* Just open physical serial and not much more
* @see PortHolder#connectAndReadConfiguration(com.rusefi.binaryprotocol.BinaryProtocol.Arguments)
*/
@Nullable
public static IoStream openPort(String port) {
log.info("[BufferedSerialIoStream] openPort " + port);
SerialPort serialPort = openSerial(port);
if (serialPort == null)
return null;
// FileLog.LOGGER.info("[SerialIoStreamJSerialComm] opened " + port);
return new BufferedSerialIoStream(serialPort, port);
}