MedallionShell: Command.StandardOutput.ReadToEnd() hangs every time

    Process.GetProcessesByName("adb").ToList().ForEach(x => x.Kill());
    var arguments = new List<string> { "connect", "127.0.0.1:21503" };
    var command = Command.Run("adb.exe", arguments,
        options => options.Timeout(TimeSpan.FromMinitues(1)));
    var output = command.StandardOutput.ReadToEnd();
    var error = command.StandardError.ReadToEnd();

adb.exe is is Android Debug Bridge

  1. the code snippet hangs every time with adb.exe version 1.0.31
  2. options.Timeout does not work, the underline process still running after 1 minute
  3. the code snippet works well with adb.exe version 1.0.39

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (14 by maintainers)

Most upvoted comments

Sorry, I should’ve mentioned that it had nothing to do with the code above. Was just commenting about a separate problem that I had. Can’t get to the machine now, but I was working on a local installment trying to call out to a GET API of a vendor. I will post the code if you’re interested later. Thanks!