8000 extmod/modwebsocket: Make sure to propagate EOF. · kevincon/circuitpython@7e9182f · GitHub
[go: up one dir, main page]

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)
0