EasyModbusTCP.NET icon indicating copy to clipboard operation
EasyModbusTCP.NET copied to clipboard

simulator connection bug while select RS485

Open masterchen opened this issue 5 years ago • 0 comments

In file ModbusServer.cs, line :388, when click accept button in setting page , clientConnectionThread is null, so it crashed.

` public void StopListening() { if (SerialFlag & (serialport != null)) { if (serialport.IsOpen) serialport.Close(); shouldStop = true; } try { tcpHandler.Disconnect(); listenerThread.Abort();

        }
        catch (Exception) { }
        listenerThread.Join();
        try
        {

            clientConnectionThread.Abort();
        }
        catch (Exception) { }
    }`

I found it was not initialised , after commiting out this line , it seems OK, can you help check ?@rossmann-engineering

masterchen avatar Nov 10 '20 00:11 masterchen