esp8266: Reset term_obj on reboot.

Also, term_obj can be NULL if socket enables REPL duplication signalling
before os.dupterm is called, so it should be checked.
This commit is contained in:
Damien George 2016-03-31 19:55:42 +03:00 committed by Paul Sokolovsky
parent 98af891610
commit 4b597a1c1a

View File

@ -52,6 +52,7 @@ STATIC void mp_reset(void) {
memset(MP_STATE_PORT(fs_user_mount), 0, sizeof(MP_STATE_PORT(fs_user_mount)));
#endif
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
#if MICROPY_MODULE_FROZEN
pyexec_frozen_module("boot");
#endif