This commit is contained in:
2025-07-15 18:10:38 +09:00
parent 14f65da8ff
commit 77944f951a

View File

@@ -86,6 +86,16 @@ namespace Octopus.Simulator.Networks
public void Connect(string clientName, string host, int port)
{
if (client != null)
{
flag = true;
clientTable.Remove(clientName);
client.OnConnected -= ((client) => OnConnected(client, clientName));
client.OnStateChanged -= OnStateChange;
client.OnDisconnect -= OnDisconnected;
client.OnError -= OnError;
}
if (string.Equals(protocol, "wss"))
{
client = new MQTTClientBuilder()