mirror of
https://github.com/oopuuu/zTC1.git
synced 2026-05-05 06:45:55 +08:00
修复了MQTT曾经连上,但中途长时间断开,导致消息队列一直增加爆内存,进而导致死机的问题
This commit is contained in:
@@ -1519,7 +1519,7 @@ document.getElementById("submit-ota-link").disabled = true;
|
||||
//return;
|
||||
var fileInput = document.getElementById("ota_file");
|
||||
if (fileInput.files.length === 0) {
|
||||
alert("请选择要上传的 OTA 文件");
|
||||
Toast("请选择要上传的 OTA 文件");
|
||||
return;
|
||||
}
|
||||
clearTimeout(powerTimerId);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include "mico.h"
|
||||
|
||||
|
||||
#include"http_server/web_log.h"
|
||||
|
||||
@@ -36,6 +38,9 @@ char* GetLogRecord()
|
||||
tmp += strlen(tmp);
|
||||
if (!log_record.logs[i%LOG_NUM]) continue;
|
||||
sprintf(tmp, "%s\n", log_record.logs[i%LOG_NUM]);
|
||||
if(i == log_record.idx){
|
||||
sprintf(tmp, "FreeMem %d bytes\n", MicoGetMemoryInfo()->free_memory);
|
||||
}
|
||||
}
|
||||
return log_record_str;
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ void ProcessHaCmd(char *cmd) {
|
||||
OSStatus UserMqttSendTopic(char *topic, char *arg, char retained) {
|
||||
OSStatus err = kUnknownErr;
|
||||
p_mqtt_send_msg_t p_send_msg = NULL;
|
||||
if(mqtt_msg_send_queue == NULL){
|
||||
if(mqtt_msg_send_queue == NULL|| !isconnect){
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user