Skip to content

Commit 7e9182f

Browse files
committed
extmod/modwebsocket: Make sure to propagate EOF.
1 parent b32b0d3 commit 7e9182f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extmod/modwebsocket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
6868
while (1) {
6969
if (self->to_recv != 0) {
7070
mp_uint_t out_sz = stream_p->read(self->sock, self->buf + self->buf_pos, self->to_recv, errcode);
71-
if (out_sz == MP_STREAM_ERROR) {
71+
if (out_sz == 0 || out_sz == MP_STREAM_ERROR) {
7272
return out_sz;
7373
}
7474
self->buf_pos += out_sz;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy