mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-02-05 18:50:06 +08:00
Fix WS reads when fragmented packets are sent.
This commit is contained in:
@@ -286,7 +286,7 @@ ssize_t net__read_ws(struct mosquitto *mosq, void *buf, size_t count)
|
||||
|
||||
if(mosq->wsd.payloadlen > 0){
|
||||
if(count > mosq->wsd.payloadlen - (uint64_t)mosq->wsd.pos){
|
||||
count = mosq->wsd.payloadlen - (uint64_t)mosq->wsd.pos + 1;
|
||||
count = mosq->wsd.payloadlen - (uint64_t)mosq->wsd.pos;
|
||||
}
|
||||
len = net__read(mosq, buf, count);
|
||||
if(len > 0){
|
||||
|
||||
Reference in New Issue
Block a user