I am searching for a long time on net. But no use this is occasional problem;
here are false mosquitto.log
1677746403: New connection from x.x.x.x:53696 on port 21883.
1677746403: New connection from x.x.x.x:53698 on port 21883.
1677746403: New connection from x.x.x.x:53700 on port 21883.
1677746403: New connection from x.x.x.x:53702 on port 21883.
1677746403: New connection from x.x.x.x:53704 on port 21883.
1677746403: New connection from x.x.x.x:53706 on port 21883.
1677746403: New connection from x.x.x.x:53708 on port 21883.
1677746403: New connection from x.x.x.x:53710 on port 21883.
1677746403: New connection from x.x.x.x:53712 on port 21883.
1677746403: New connection from x.x.x.x:53714 on port 21883.
1677746403: New connection from x.x.x.x:53716 on port 21883.
1677746403: New connection from x.x.x.x:53718 on port 21883.
1677746403: New connection from x.x.x.x:53720 on port 21883.
this is correct situation
1676530842: New connection from x.x.x.x:56714 on port 21883.
1676530842: New client connected from x.x.x.x:56714 as rec8cee7f3492dbf85f7f483b04541283e (p2, c1, k30).
1676530842: Will message specified (7 bytes) (r0, q2).
1676530842: willTopic
1676530842: Sending CONNACK to rec8cee7f3492dbf85f7f483b04541283e (0, 0)
this is my code
ck(mosquitto_lib_init(), "mosquitto_lib_init()");
m_strId = id;
m_strIp = ip;
m_nPort = port;
m_nKeepAlive = keepTime;
if (username.size())
set_name_pwd(username, pwd);
m_mosq = mosquitto_new(NULL, true, NULL);
mosquitto_connect_callback_set(m_mosq,on_connect);
mosquitto_disconnect_callback_set(m_mosq,on_disconnect);
mosquitto_publish_callback_set(m_mosq, on_publish);
int rec = ck(mosquitto_connect_async(m_mosq,m_strIp.c_str(), m_nPort, m_nKeepAlive), "connect_async");
Thanks in advance