esp8266/esp_mphal: call_dupterm_read(): Fix order of deactivating on EOF.
First deactivate, then print diagnostic message.
This commit is contained in:
parent
19e3c9d53a
commit
959ed931a4
@ -178,8 +178,8 @@ static int call_dupterm_read(void) {
|
|||||||
mp_buffer_info_t bufinfo;
|
mp_buffer_info_t bufinfo;
|
||||||
mp_get_buffer_raise(res, &bufinfo, MP_BUFFER_READ);
|
mp_get_buffer_raise(res, &bufinfo, MP_BUFFER_READ);
|
||||||
if (bufinfo.len == 0) {
|
if (bufinfo.len == 0) {
|
||||||
mp_printf(&mp_plat_print, "dupterm: EOF received, deactivating\n");
|
|
||||||
MP_STATE_PORT(term_obj) = NULL;
|
MP_STATE_PORT(term_obj) = NULL;
|
||||||
|
mp_printf(&mp_plat_print, "dupterm: EOF received, deactivating\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
nlr_pop();
|
nlr_pop();
|
||||||
|
Loading…
Reference in New Issue
Block a user