Reading from a process, StreamReader.Peek() not working as expected

前端 未结 1 389
名媛妹妹
名媛妹妹 2021-01-14 16:02

See the following class below, I use it to read the output from any of the processes that are added to it. At the moment I\'m starting up a Jar that acts as a channel adapte

相关标签:
1条回答
  • 2021-01-14 16:22

    Seems that this is a known bug in StreamReader implementation, as suggested in this answer. The workaround in your case is to use asynchronous stream methods like StreamReader.ReadAsync or StreamReader.ReadLineAsync.

    0 讨论(0)
提交回复
热议问题