On Windows, `ThreadedCommunication::ReadThread` can fail with `ERROR_INVALID_HANDLE` when the ConPTY is closed. Currently it's not caught, causing the `ReadThread` to continue forever because `done` is never set to `true`. This causes an infinite hang.