public override bool StartAsyncAcceptingClients() { keep_modbus_server_alive = true; try { ClientManagmentThread.Start(); } catch (Exception e) { if ((e is ThreadStateException) || (e is OutOfMemoryException)) { return(false); } else { throw e; } // Unexpected exception } return(true); }
public override bool StartAsyncAcceptingClients() { MCU.StartAsyncAcceptingClients(); keep_modbus_server_alive = true; try { ClientManagmentThread.Start(); } catch (Exception e) { if ((e is ThreadStateException) || (e is OutOfMemoryException)) { logger.Error(Utilities.GetTimeStamp() + ": failed to start prodi=uction plc and mcu threads err:____ {0}", e); return(false); } else { throw e; } // Unexpected exception } return(true); }