Commit 959ed931 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

esp8266/esp_mphal: call_dupterm_read(): Fix order of deactivating on EOF.

First deactivate, then print diagnostic message.
parent 19e3c9d5
......@@ -178,8 +178,8 @@ static int call_dupterm_read(void) {
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(res, &bufinfo, MP_BUFFER_READ);
if (bufinfo.len == 0) {
mp_printf(&mp_plat_print, "dupterm: EOF received, deactivating\n");
MP_STATE_PORT(term_obj) = NULL;
mp_printf(&mp_plat_print, "dupterm: EOF received, deactivating\n");
return -1;
}
nlr_pop();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment