diff options
Diffstat (limited to 'extmod/network_ppp_lwip.c')
-rw-r--r-- | extmod/network_ppp_lwip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/network_ppp_lwip.c b/extmod/network_ppp_lwip.c index 15e3ba029..d7a1cf5e0 100644 --- a/extmod/network_ppp_lwip.c +++ b/extmod/network_ppp_lwip.c @@ -146,7 +146,7 @@ static mp_obj_t network_ppp_poll(size_t n_args, const mp_obj_t *args) { mp_int_t total_len = 0; mp_obj_t stream; - while ((stream = self->stream) != mp_const_none) { + while (self->state >= STATE_ACTIVE && (stream = self->stream) != mp_const_none) { uint8_t buf[256]; int err; mp_uint_t len = mp_stream_rw(stream, buf, sizeof(buf), &err, 0); |