Skip to content
Snippets Groups Projects
Commit 75bb2cf6 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Publish client highwater mark (max concurrent client stat) to MQTT

parent 5004246d
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -6763,6 +6763,7 @@ void http_session_thread(void* arg)
if(client_highwater > 1)
lprintf(LOG_NOTICE, "%04d New active client highwater mark: %u"
,session.socket, client_highwater);
mqtt_pub_uintval(&mqtt, TOPIC_SERVER, "highwater", client_highwater);
}
update_clients();
SAFECOPY(session.username,unknown);
......@@ -6971,7 +6972,7 @@ static void cleanup(int code)
thread_down();
if(terminate_server || code)
lprintf(LOG_INFO,"#### Web Server thread terminated (%lu clients served, %lu concurrently)"
lprintf(LOG_INFO,"#### Web Server thread terminated (%lu clients served, %u concurrently)"
,served, client_highwater);
set_state(SERVER_STOPPED);
mqtt_shutdown(&mqtt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment