mochi-mqtt / server

The fully compliant, embeddable high-performance Go MQTT v5 server for IoT, smarthome, and pubsub
MIT License
1.3k stars 223 forks source link

improve transport performance with bufio #321

Closed x20080406 closed 1 year ago

x20080406 commented 1 year ago

This code snippet can improve the network throughput for the subscriber.

x20080406 commented 1 year ago

I love anything which can increase throughput, however there are some significant test failures which need to be addressed before we can properly review and merge 🙂

Yes. I've fixed them. Root cause: the variable Conn in ClientConnection has been reset in server_test.go, but the bconn does not been reset.

mochi-co commented 1 year ago

Looks good to me, this will go out in the next release - thank you @x20080406 !