idf_monitor: Fix bug with Windows 10 sometimes printing a character twice
idf_monitor: Fix bug with Windows 10 sometimes printing a character twice

Turns out when IOError is thrown by the console, the character is
also successfully displayed.

Revisits fix from https://github.com/espressif/esp-idf/issues/1136

As reported https://esp32.com/viewtopic.php?f=14&t=4766&p=20637

Hermiedapwdrman/esp-idf,armada-ai/esp-idf,mashaoze/esp-idf,www220/esp-idf,Hermiedapwdrman/esp-idf,armada-ai/esp-idf,espressif/esp-idf,espressif/esp-idf,www220/esp-idf,mashaoze/esp-idf,armada-ai/esp-idf,espressif/esp-idf,mashaoze/esp-idf,www220/esp-idf,Hermiedapwdrman/esp-idf,www220/esp-idf,espressif/esp-idf,Hermiedapwdrman/esp-idf,mashaoze/esp-idf,mashaoze/esp-idf,Hermiedapwdrman/esp-idf,www220/esp-idf,armada-ai/esp-idf