Comments (9)
是的,这个问题我也发现了,断连后重联就会段错误,目前我是添加了c->mqtt_network = (network_t*) platform_memory_alloc(sizeof(network_t));这句解决,按照上面老哥说的, c->mqtt_read_buf = (uint8_t*) platform_memory_alloc(c->mqtt_write_buf_size);
c->mqtt_write_buf = (uint8_t*) platform_memory_alloc(c->mqtt_write_buf_size);这两个确实时重复申请了
from mqttclient.
老哥,重连确实有段错误问题,我也遇到到了,重连导致内存被非法访问
from mqttclient.
是的,这个问题我也发现了,断连后重联就会段错误,目前我是添加了c->mqtt_network = (network_t*) platform_memory_alloc(sizeof(network_t));这句解决,按照上面老哥说的, c->mqtt_read_buf = (uint8_t*) platform_memory_alloc(c->mqtt_write_buf_size);
c->mqtt_write_buf = (uint8_t*) platform_memory_alloc(c->mqtt_write_buf_size);这两个确实时重复申请了
怎么解决的,老哥
from mqttclient.
就按照上面说的修改就可以了
from mqttclient.
是的,这个问题我也发现了,断连后重联就会段错误,目前我是添加了c->mqtt_network = (network_t*) platform_memory_alloc(sizeof(network_t));这句解决,按照上面老哥说的, c->mqtt_read_buf = (uint8_t*) platform_memory_alloc(c->mqtt_write_buf_size);
c->mqtt_write_buf = (uint8_t*) platform_memory_alloc(c->mqtt_write_buf_size);这两个确实时重复申请了
from mqttclient.
是的,这个问题我也发现了,断连后重联就会段错误,目前我是添加了c->mqtt_network = (network_t*) platform_memory_alloc(sizeof(network_t));这句解决,按照上面老哥说的, c->mqtt_read_buf = (uint8_t*) platform_memory_alloc(c->mqtt_write_buf_size);
c->mqtt_write_buf = (uint8_t*) platform_memory_alloc(c->mqtt_write_buf_size);这两个确实时重复申请了
添加c->mqtt_network = (network_t*) platform_memory_alloc(sizeof(network_t));不如将重连失败释放的那两行注释调,加这一句相当于释放了,再申请。理由:假如一致重连失败,这个接口会在内置的线程里重复调用的。
from mqttclient.
c->mqtt_network在network_release里面被清零了,所以不用释放,直接屏蔽 platform_memory_free(c->mqtt_network),添加c->mqtt_write_buf和c->mqtt_read_buf内存释放,就可以了
from mqttclient.
c->mqtt_network在network_release里面被清零了,所以不用释放,直接屏蔽 platform_memory_free(c->mqtt_network),添加c->mqtt_write_buf和c->mqtt_read_buf内存释放,就可以了
@Torchwoods openwrt现在不搞了吗?
from mqttclient.
感谢各位的issue,现在已解决。
from mqttclient.
Related Issues (20)
- 如何配置 TLS/SSL 以实现仅服务器加密而不进行服务器认证的方式,有实现案例嘛?
- 执行完./build.sh后,在./build/bin目录下没有emqx等执行文件 HOT 1
- 最新源码编译时mqttclient-master/common/log/salof_config.h:12:10: fatal error: mqtt_config.h: No such file or directory HOT 1
- 执行build.sh出现问题 HOT 3
- mqttclient连接上server后,断开网络, mqttclient会尝试重连,每次重连就会出现内存泄漏 HOT 6
- v1.2.0版本和master版本为何删除了test目录?目前执行make-libmqttclient.sh编译会失败 HOT 1
- 怎样增加windows的支持
- 目前有没有1.2.0版本的rt-thread。或者该分支支持rt-thread平台运行吗?
- 请问一下linux下还支持x509证书吗
- tls验证openssl CA证书失败 HOT 3
- ../mqttclient/mqttclient.c:951 mqtt_yield_thread()..., mqtt reconnect timeout....不自动重连的问题
- linux下,mqtt服务器一关闭程序就退出了?
- cleansession=false,无法接受离线消息
- cleansession=false,无法接受离线消息 HOT 1
- 怎么调用mqtt_subscribe使用同一个连接订阅多个主题,应该怎么调整相关代码,调整代码的思路是什么
- 自签名双向认证如何实现? HOT 1
- mqtt5.0
- mqtt_subscribe 缓存已经改成8192, 最大接受数据971个
- platform_net_socket_recv_timeout 区分超时与连接断开
- 枚举变量非对齐访问问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mqttclient.