diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-04-13 16:35:50 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-04-13 16:35:50 +0300 |
commit | 959ed931a4d4079b4902f3d56e1696a2370e6c20 (patch) | |
tree | 3561e215793a052cb4ad1b7c2dd73d42f8b76b9c /esp8266 | |
parent | 19e3c9d53a86cb8696bab93d645f6e63dfd26c2f (diff) | |
download | micropython-959ed931a4d4079b4902f3d56e1696a2370e6c20.tar.gz micropython-959ed931a4d4079b4902f3d56e1696a2370e6c20.zip |
esp8266/esp_mphal: call_dupterm_read(): Fix order of deactivating on EOF.
First deactivate, then print diagnostic message.
Diffstat (limited to 'esp8266')
-rw-r--r-- | esp8266/esp_mphal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c index 4427c44976..72c3b8b59b 100644 --- a/esp8266/esp_mphal.c +++ b/esp8266/esp_mphal.c @@ -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(); |