Reset the io_error_fd right before the generator kills off the receiver