diff --git a/Common/Hardware/Interfaces/Ports/SerialPorts/BaseSerialPort.cs b/Common/Hardware/Interfaces/Ports/SerialPorts/BaseSerialPort.cs
index 13ae7987..9db4a064 100644
--- a/Common/Hardware/Interfaces/Ports/SerialPorts/BaseSerialPort.cs
+++ b/Common/Hardware/Interfaces/Ports/SerialPorts/BaseSerialPort.cs
@@ -419,6 +419,9 @@ namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
/// The IrDA sniffer showed these on the communication line, but they are incompletely received.
/// Assuming the DiscardInBuffer may be delayed, so the incoming data will be scrapped.
///
+ ///
+ /// - Dispose procedure changed.
+ ///
private void ReadingThreadLoop()
{
//put the receive thread to JoinWaitSleep to avoid reading and logger output for timeout on
@@ -608,20 +611,23 @@ namespace Xylem.Common.Hardware.Interfaces.Ports.SerialPorts
}
finally
{
- if (_serialPort.IsOpen)
- {
- _serialPort.Close();
- if (_serialPort.IsOpen)
- {
- _byteDataLogger.Info($"{Ident} Port close delay!");
- Thread.Sleep(50);
- _serialPort.Close();
- }
- _serialPort.Dispose();
- _byteDataLogger.Info($"{Ident} Port is closed");
+ //if (_serialPort.IsOpen)
+ //{
+ // _serialPort.Close();
+ // if (_serialPort.IsOpen)
+ // {
+ // _byteDataLogger.Info($"{Ident} Port closing delay!");
+ // Thread.Sleep(500);
+ // _serialPort.Close();
+ // }
+ // //_serialPort.Dispose();
+ // //_byteDataLogger.Info($"{Ident} Port is closed");
+ //}
+ _serialPort.DiscardInBuffer();
+ _serialPort.DiscardOutBuffer();
+ _serialPort.Close();
-
- }
+ _byteDataLogger.Info($"{Ident} Port is closed");
}
}
diff --git a/Common/Production/ProductionUiCordonel/Docu/TBF_COM_EOL_SDDe.docx b/Common/Production/ProductionUiCordonel/Docu/TBF_COM_EOL_SDDe.docx
deleted file mode 100644
index 969eff1a..00000000
Binary files a/Common/Production/ProductionUiCordonel/Docu/TBF_COM_EOL_SDDe.docx and /dev/null differ
diff --git a/Common/Production/ProductionUiCordonel/Docu/TBF_COM_EOL_SRSe.docx b/Common/Production/ProductionUiCordonel/Docu/TBF_COM_EOL_SRSe.docx
index 68e79a87..76f21119 100644
Binary files a/Common/Production/ProductionUiCordonel/Docu/TBF_COM_EOL_SRSe.docx and b/Common/Production/ProductionUiCordonel/Docu/TBF_COM_EOL_SRSe.docx differ
diff --git a/Common/Production/ProductionUiCordonel/ProductionProcesses/FinalProcessController.cs b/Common/Production/ProductionUiCordonel/ProductionProcesses/FinalProcessController.cs
index 408c53a3..21092831 100644
--- a/Common/Production/ProductionUiCordonel/ProductionProcesses/FinalProcessController.cs
+++ b/Common/Production/ProductionUiCordonel/ProductionProcesses/FinalProcessController.cs
@@ -588,11 +588,14 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses
///
/// - Handle genesis meter is null as new meter.
///
+ ///
+ /// - Check _genesisMeter not null before equality with old pcbid.
+ ///
private Boolean CheckForNewMeter()
{
if (_genesisMeter == null ||
(!string.IsNullOrEmpty(_lastPcbId) &&
- !_genesisMeter.PcbId.Equals(_lastPcbId)))
+ _genesisMeter != null && !_genesisMeter.PcbId.Equals(_lastPcbId)))
{
// This loop will be entered after the meter has changed, but not on the initial meter
// after program start.